Skip to content

Commit aec2d7c

Browse files
committed
update DismissableBanner story: change title, add decorators, and adjust children components [Fixes #13044]
1 parent bf774f2 commit aec2d7c

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
import React from "react"
22
import { FaInfoCircle } from "react-icons/fa"
3-
import { Button, Center, Icon, Text } from "@chakra-ui/react"
3+
import { Center, Container, Icon, Text } from "@chakra-ui/react"
44
import { Meta, StoryObj } from "@storybook/react"
55

66
import DismissableBanner from "."
77

88
const meta = {
9-
title: "DismissableBanner",
9+
title: "Molecules / Navigation",
1010
component: DismissableBanner,
1111
parameters: {
12-
chromatic: { disableSnapshot: false },
12+
layout: "fullscreen",
1313
},
14+
decorators: [
15+
(Story) => (
16+
<Container mx="auto" maxW="1504px">
17+
<Story />
18+
</Container>
19+
),
20+
],
1421
} satisfies Meta<typeof DismissableBanner>
1522

1623
export default meta
@@ -19,25 +26,21 @@ type Story = StoryObj<typeof meta>
1926
export const Basic: Story = {
2027
args: {
2128
storageKey: "dismissable-banner-1",
22-
children: <Center>This is a dismissable banner notification.</Center>,
29+
children: <Text>This is a dismissable banner notification.</Text>,
2330
},
24-
render: (args) => <DismissableBanner {...args} />,
2531
}
2632

2733
export const WithLongText: Story = {
2834
args: {
2935
storageKey: "dismissable-banner-2",
3036
children: (
31-
<Center>
32-
<Text>
33-
This is a dismissable banner with a very long text content to see how
34-
it handles overflow and wrapping. It should be able to manage the text
35-
properly without breaking the layout.
36-
</Text>
37-
</Center>
37+
<Text>
38+
This is a dismissable banner with a very long text content to see how it
39+
handles overflow and wrapping. It should be able to manage the text
40+
properly without breaking the layout.
41+
</Text>
3842
),
3943
},
40-
render: (args) => <DismissableBanner {...args} />,
4144
}
4245

4346
export const WithIcon: Story = {
@@ -50,5 +53,4 @@ export const WithIcon: Story = {
5053
</Center>
5154
),
5255
},
53-
render: (args) => <DismissableBanner {...args} />,
5456
}

0 commit comments

Comments
 (0)