Skip to content

Commit a44ef4b

Browse files
committed
add better tag examples
1 parent b2c3a26 commit a44ef4b

5 files changed

Lines changed: 31 additions & 6 deletions

File tree

src/components/OverviewItem/stories/OverviewItem.stories.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ import {
1010
OverviewItemActions,
1111
OverviewItemDepiction,
1212
OverviewItemDescription,
13+
OverviewItemLine,
14+
Tag,
15+
TagList,
1316
} from "./../../../../index";
1417
import { FullExample as OtherDepictionExample } from "./../../Depiction/stories/Depiction.stories";
1518
import { Default as ActionsExample } from "./OverviewItemActions.stories";
1619
import { AutoTransform as DepictionExample } from "./OverviewItemDepiction.stories";
1720
import { Default as DescriptionExample } from "./OverviewItemDescription.stories";
21+
import { Default as LineExample } from "./OverviewItemLine.stories";
1822

1923
export default {
2024
title: "Components/OverviewItem",
@@ -76,3 +80,24 @@ ItemWithDepictionElement.args = {
7680
hasSpacing: true,
7781
hasCardWrapper: true,
7882
};
83+
84+
export const ItemWithTags = Template.bind({});
85+
ItemWithTags.args = {
86+
children: [
87+
<OverviewItemDepiction {...DepictionExample.args} key={"depiction"} />,
88+
<OverviewItemDescription key={"description"}>
89+
<OverviewItemLine {...LineExample.args} />
90+
<OverviewItemLine>
91+
<TagList>
92+
<Tag small>Test</Tag>
93+
<Tag small>Tag</Tag>
94+
<Tag small>List</Tag>
95+
</TagList>
96+
</OverviewItemLine>
97+
</OverviewItemDescription>,
98+
<OverviewItemActions children={ActionsExample.args.children[0]} key={"actions"} />,
99+
],
100+
densityHigh: false,
101+
hasSpacing: true,
102+
hasCardWrapper: true,
103+
};

src/components/OverviewItem/stories/OverviewItemActions.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
subcomponents: { Button, IconButton, ContextMenu },
1010
argTypes: {
1111
children: {
12-
control: "none",
12+
control: false,
1313
description: "User-interactive elements.",
1414
},
1515
},
@@ -20,7 +20,7 @@ const Template: StoryFn<typeof OverviewItemActions> = (args) => <OverviewItemAct
2020
export const Default = Template.bind({});
2121
Default.args = {
2222
children: [
23-
<IconButton name="item-remove" tooltip="Remove this item" disruptive />,
23+
<IconButton name="item-remove" text="Remove this item" disruptive />,
2424
<Button affirmative>Other action</Button>,
2525
],
2626
};

src/components/OverviewItem/stories/OverviewItemDescription.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
},
1313
argTypes: {
1414
children: {
15-
control: "none",
15+
control: false,
1616
description: "Elements for text content.",
1717
},
1818
},

src/components/OverviewItem/stories/OverviewItemLine.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
component: OverviewItemLine,
1010
argTypes: {
1111
children: {
12-
control: "none",
12+
control: false,
1313
description: "Elements for line content.",
1414
},
1515
},

src/components/Tag/stories/TagList.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
component: TagList,
99
argTypes: {
1010
children: {
11-
control: "none",
11+
control: false,
1212
},
1313
},
1414
} as Meta<typeof TagList>;
@@ -18,5 +18,5 @@ const Template: StoryFn<typeof TagList> = (args) => <TagList {...args} />;
1818
export const List = Template.bind({});
1919
List.args = {
2020
label: "Tag list",
21-
children: [<Tag>Short</Tag>, <Tag>List</Tag>, <Tag>Of</Tag>, <Tag>Tags</Tag>],
21+
children: [<Tag small>Short</Tag>, <Tag>List</Tag>, <Tag>Of</Tag>, <Tag large>Tags</Tag>],
2222
};

0 commit comments

Comments
 (0)