Skip to content

Commit faa6890

Browse files
committed
fixed: typo comment and repetetive css declaration
1 parent 10e9893 commit faa6890

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

docs/DATAMODEL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,7 @@ mkdir -p src/ lalalaaaa
19731973
---
19741974
19751975
## `autoCollapse`
1976-
It will allow you to limit the card height up to 25% of the screen height and give and option to expand/collapse it back.
1976+
It will allow you to limit the card height up to 25% of the screen height and give an option to expand/collapse it back.
19771977
19781978
```typescript
19791979
mynahUI.addChatItem(tabId, {

src/components/chat-item/chat-item-card.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ export class ChatItemCard {
176176
if (elm != null) {
177177
if (this.props.chatItem.autoCollapse === true && elm.scrollHeight > window.innerHeight / 4) {
178178
this.render?.addClass('mynah-chat-item-auto-collapse');
179-
// ...(this.props.chatItem.autoCollapse === true ? [ 'mynah-chat-item-auto-collapse' ] : []),
180179
} else {
181180
this.render?.removeClass('mynah-chat-item-auto-collapse');
182181
}

src/styles/components/chat/_chat-item-card.scss

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,14 @@
111111
}
112112
}
113113

114+
--mynah-chat-item-more-content-indicator-bg-color: var(--mynah-card-bg);
115+
114116
&.mynah-chat-item-auto-collapse {
115117
> .more-content-indicator {
116118
order: 1000;
117119
justify-content: center;
118-
background-color: var(--mynah-card-bg);
119-
box-shadow: 0 -15px 15px 0px var(--mynah-card-bg);
120+
background-color: var(--mynah-chat-item-more-content-indicator-bg-color);
121+
box-shadow: 0 -10px 10px -5px var(--mynah-chat-item-more-content-indicator-bg-color);
120122
height: var(--mynah-sizing-9);
121123
z-index: 1000;
122124
position: absolute;
@@ -398,8 +400,7 @@
398400
&.mynah-chat-item-directive {
399401
color: var(--mynah-color-text-weak);
400402
&.mynah-chat-item-auto-collapse > .more-content-indicator {
401-
background-color: var(--mynah-color-bg);
402-
box-shadow: 0 -15px 15px 0px var(--mynah-color-bg);
403+
--mynah-chat-item-more-content-indicator-bg-color: var(--mynah-color-bg);
403404
border-bottom-left-radius: 0;
404405
border-bottom-right-radius: 0;
405406
}
@@ -445,17 +446,15 @@
445446
}
446447

447448
&.mynah-chat-item-auto-collapse > .more-content-indicator {
448-
background-color: var(--mynah-card-bg-alternate);
449-
box-shadow: 0 -15px 15px 0px var(--mynah-card-bg-alternate);
449+
--mynah-chat-item-more-content-indicator-bg-color: var(--mynah-card-bg-alternate);
450+
color: var(--mynah-color-text-alternate);
450451
border-bottom-right-radius: var(--mynah-card-radius-corner);
451452
border-bottom-left-radius: var(--mynah-card-radius);
452-
color: var(--mynah-color-text-alternate);
453453
}
454454
}
455455
&.mynah-chat-item-system-prompt {
456456
&.mynah-chat-item-auto-collapse > .more-content-indicator {
457-
background-color: var(--mynah-color-status-warning);
458-
box-shadow: 0 -15px 15px 0px var(--mynah-color-status-warning);
457+
--mynah-chat-item-more-content-indicator-bg-color: var(--mynah-color-status-warning);
459458
}
460459
> .mynah-card {
461460
background-color: var(--mynah-color-status-warning);

0 commit comments

Comments
 (0)