Skip to content

Commit 43a4bbd

Browse files
committed
extend chat area content examples
1 parent 4450973 commit 43a4bbd

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

src/components/Chat/stories/ChatArea.stories.tsx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
import React from "react";
22
import { Meta, StoryFn } from "@storybook/react";
33

4-
import { ChatArea, ChatContent, ChatContentCollapsed, ChatField } from "../../../index";
4+
import {
5+
ChatArea,
6+
ChatContent,
7+
ChatContentCollapsed,
8+
ChatField,
9+
ContentGroup,
10+
Spacing,
11+
TitleSubsection,
12+
} from "../../../index";
513

14+
import { BasicExample as ContentGroupExample } from "./../../ContentGroup/ContentGroup.stories";
615
import { Default as ShortChatBubble, LongChatBubble } from "./ChatContent.stories";
716
import { Default as ChatFieldExample } from "./ChatField.stories";
817

@@ -24,7 +33,21 @@ Default.args = {
2433
chatField: <ChatField {...ChatFieldExample.args} />,
2534
children: [
2635
<ChatContent {...ShortChatBubble.args} alignment="right" indentationSize="medium" />,
27-
<ChatContent {...ShortChatBubble.args} avatar={undefined} displayType="free" />,
36+
<ChatContentCollapsed textReducerProps={{ maxNodes: 1 }}>
37+
<ChatContent
38+
avatar={undefined}
39+
displayType="free"
40+
statusLine={
41+
<>
42+
<strong>Bot</strong> right now
43+
</>
44+
}
45+
>
46+
<TitleSubsection>Some technical content</TitleSubsection>
47+
<Spacing size="small" />
48+
<ContentGroup {...ContentGroupExample.args} style={{ marginRight: "2px" }} />
49+
</ChatContent>
50+
</ChatContentCollapsed>,
2851
<ChatContent {...ShortChatBubble.args} alignment="right" indentationSize="medium" />,
2952
<ChatContentCollapsed>
3053
<ChatContent {...LongChatBubble.args} />

src/components/Chat/stories/ChatContent.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ LongChatBubble.args = {
5454
displayType: "simple",
5555
children: (
5656
<HtmlContentBlock>
57-
<LoremIpsum p={10} avgSentencesPerParagraph={10} random={false} />
57+
<LoremIpsum p={7} avgSentencesPerParagraph={7} random={false} />
5858
</HtmlContentBlock>
5959
),
6060
limitHeight: true,

0 commit comments

Comments
 (0)