1
1
import React from "react"
2
2
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"
4
4
import { Meta , StoryObj } from "@storybook/react"
5
5
6
6
import DismissableBanner from "."
7
7
8
8
const meta = {
9
- title : "DismissableBanner " ,
9
+ title : "Molecules / Navigation " ,
10
10
component : DismissableBanner ,
11
11
parameters : {
12
- chromatic : { disableSnapshot : false } ,
12
+ layout : "fullscreen" ,
13
13
} ,
14
+ decorators : [
15
+ ( Story ) => (
16
+ < Container mx = "auto" maxW = "1504px" >
17
+ < Story />
18
+ </ Container >
19
+ ) ,
20
+ ] ,
14
21
} satisfies Meta < typeof DismissableBanner >
15
22
16
23
export default meta
@@ -19,25 +26,21 @@ type Story = StoryObj<typeof meta>
19
26
export const Basic : Story = {
20
27
args : {
21
28
storageKey : "dismissable-banner-1" ,
22
- children : < Center > This is a dismissable banner notification.</ Center > ,
29
+ children : < Text > This is a dismissable banner notification.</ Text > ,
23
30
} ,
24
- render : ( args ) => < DismissableBanner { ...args } /> ,
25
31
}
26
32
27
33
export const WithLongText : Story = {
28
34
args : {
29
35
storageKey : "dismissable-banner-2" ,
30
36
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 >
38
42
) ,
39
43
} ,
40
- render : ( args ) => < DismissableBanner { ...args } /> ,
41
44
}
42
45
43
46
export const WithIcon : Story = {
@@ -50,5 +53,4 @@ export const WithIcon: Story = {
50
53
</ Center >
51
54
) ,
52
55
} ,
53
- render : ( args ) => < DismissableBanner { ...args } /> ,
54
56
}
0 commit comments