File tree Expand file tree Collapse file tree 4 files changed +18
-4
lines changed
packages/main/src/components Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 64
64
padding : 0 ;
65
65
}
66
66
67
+ .chromaticPopoverContainer {
68
+ height : 500px ;
69
+ width : 500px ;
70
+ display : flex;
71
+ align-items : center;
72
+ }
73
+
67
74
.infoTable {
68
75
margin : 1rem 0 ;
69
76
border-spacing : 0 ;
Original file line number Diff line number Diff line change @@ -41,9 +41,10 @@ type Story = StoryObj<typeof meta>;
41
41
42
42
export const Default : Story = {
43
43
render ( args ) {
44
- const [ actionSheetOpen , setActionSheetOpen ] = useState ( isChromatic || args . open ) ;
44
+ const [ actionSheetOpen , setActionSheetOpen ] = useState < boolean | undefined > ( isChromatic || args . open ) ;
45
+ const containerClass = isChromatic ? 'chromaticPopoverContainer' : undefined ;
45
46
return (
46
- < div >
47
+ < div className = { containerClass } >
47
48
< Button
48
49
onClick = { ( ) => {
49
50
setActionSheetOpen ( true ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ const meta = {
15
15
title : 'Modals & Popovers / SelectDialog' ,
16
16
component : OriginalSelectDialog ,
17
17
argTypes : { children : { control : { disable : true } } } ,
18
- args : { headerText : 'Select Product' }
18
+ args : { headerText : 'Select Product' } ,
19
+ parameters : {
20
+ chromatic : { delay : 1000 }
21
+ }
19
22
} satisfies Meta < typeof OriginalSelectDialog > ;
20
23
21
24
export default meta ;
@@ -35,7 +38,7 @@ const listItems = [
35
38
] ;
36
39
export const Default : Story = {
37
40
render : ( args ) => {
38
- const [ open , setOpen ] = useState ( isChromatic || args . open ) ;
41
+ const [ open , setOpen ] = useState < boolean | undefined > ( isChromatic || args . open ) ;
39
42
const onButtonClick = ( ) => {
40
43
setOpen ( true ) ;
41
44
} ;
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ const meta = {
33
33
args : {
34
34
design : ToolbarDesign . Auto ,
35
35
toolbarStyle : ToolbarStyle . Standard
36
+ } ,
37
+ parameters : {
38
+ chromatic : { delay : 1000 }
36
39
}
37
40
} satisfies Meta < typeof Toolbar > ;
38
41
You can’t perform that action at this time.
0 commit comments