File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,8 @@ export default class IgcChatComponent extends EventEmitterMixin<
317317 ? html `< div part ="empty-state ">
318318 < slot name ="empty-state "> </ slot >
319319 </ div > `
320- : html `< igc-chat-message-list > </ igc-chat-message-list > ` }
320+ : html `< igc-chat-message-list part ="chat-messages ">
321+ </ igc-chat-message-list > ` }
321322 ${ hasSuggestions &&
322323 this . _chatState . suggestionsPosition === 'below-messages'
323324 ? this . renderSuggestions ( )
Original file line number Diff line number Diff line change 44$inline-inset : rem (16px );
55
66:host {
7+ --igc-chat-height : 100% ;
8+
79 width : 100% ;
8- height : 100 vh ;
10+ height : var ( --igc-chat-height ) ;
911 overflow : hidden ;
1012 box-shadow : var (--ig-elevation-24 );
1113 display : flex ;
@@ -20,7 +22,7 @@ $inline-inset: rem(16px);
2022 gap : rem (24px );
2123}
2224
23- igc- chat-message-list ,
25+ [ part = ' chat-messages ' ] ,
2426[part = ' empty-state' ],
2527[part = ' suggestions-container' ] {
2628 max-width : calc (rem (760px ) + $inline-inset * 2 );
Original file line number Diff line number Diff line change @@ -573,6 +573,7 @@ export const Basic: Story = {
573573 messages = initialMessages ;
574574 return html `
575575 < igc-chat
576+ style ="--igc-chat-height: calc(100vh - 32px); "
576577 .messages =${ messages }
577578 .options =${ chat_options }
578579 @igcMessageCreated=${ handleMessageSend }
@@ -593,13 +594,18 @@ export const Supabase: Story = {
593594 } ) ;
594595 } ,
595596 render : ( ) => html `
596- < igc-chat @igcMessageCreated =${ handleMessageCreatedSupabase } > </ igc-chat >
597+ < igc-chat
598+ style ="--igc-chat-height: calc(100vh - 32px); "
599+ @igcMessageCreated =${ handleMessageCreatedSupabase }
600+ >
601+ </ igc-chat >
597602 ` ,
598603} ;
599604
600605export const AI : Story = {
601606 render : ( ) => html `
602607 < igc-chat
608+ style ="--igc-chat-height: calc(100vh - 32px); "
603609 .draftMessage =${ draftMessage }
604610 .options =${ ai_chat_options }
605611 @igcMessageCreated=${ handleAIMessageSend }
@@ -637,6 +643,7 @@ export const Chat_Templates: Story = {
637643 messages = [ ] ;
638644 return html `
639645 < igc-chat
646+ style ="--igc-chat-height: calc(100vh - 32px); "
640647 .messages =${ messages }
641648 .options =${ options }
642649 @igcMessageCreated=${ handleMessageSend }
You can’t perform that action at this time.
0 commit comments