Use vh instead of % to fix storybook rendering of chat container.

This commit is contained in:
Gabe Kangas 2022-07-21 12:15:03 -07:00
parent 25d52c4e1a
commit 0574725be8
No known key found for this signature in database
GPG key ID: 9A56337728BC81EA
2 changed files with 3 additions and 3 deletions

View file

@ -102,7 +102,7 @@ export default function ChatContainer(props: Props) {
() => (
<>
<Virtuoso
style={{ height: 'calc(100% - 110px)', width: 'auto' }}
style={{ height: 'calc(100vh - 170px)', width: 'auto' }}
ref={chatContainerRef}
initialTopMostItemIndex={messages.length - 1} // Force alignment to bottom
data={messages}

View file

@ -35,8 +35,8 @@ const AddMessagesChatExample = args => {
</button>
<ChatContainer
messages={chatMessages}
usernameToHighlight={null}
chatUserId={null}
usernameToHighlight="testuser"
chatUserId="testuser"
isModerator={false}
isMobile={false}
/>