File tree 1 file changed +9
-16
lines changed
site/src/components/Dialogs/DeleteDialog 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change 1
1
import { action } from "@storybook/addon-actions" ;
2
- import { ComponentMeta , Story } from "@storybook/react" ;
3
- import { DeleteDialog , DeleteDialogProps } from "./DeleteDialog" ;
2
+ import type { Meta , StoryObj } from "@storybook/react" ;
3
+ import { DeleteDialog } from "./DeleteDialog" ;
4
4
5
- export default {
6
- title : "Components /Dialogs/DeleteDialog" ,
5
+ const meta : Meta < typeof DeleteDialog > = {
6
+ title : "components /Dialogs/DeleteDialog" ,
7
7
component : DeleteDialog ,
8
- argTypes : {
9
- open : {
10
- control : "boolean" ,
11
- } ,
12
- } ,
13
8
args : {
14
9
onCancel : action ( "onClose" ) ,
15
10
onConfirm : action ( "onConfirm" ) ,
16
- open : true ,
11
+ isOpen : true ,
17
12
entity : "foo" ,
18
13
name : "MyFoo" ,
19
14
info : "Here's some info about the foo so you know you're deleting the right one." ,
20
15
} ,
21
- } as ComponentMeta < typeof DeleteDialog > ;
16
+ } ;
22
17
23
- const Template : Story < DeleteDialogProps > = ( args ) => < DeleteDialog { ...args } /> ;
18
+ export default meta ;
19
+ type Story = StoryObj < typeof DeleteDialog > ;
24
20
25
- export const Example = Template . bind ( { } ) ;
26
- Example . args = {
27
- isOpen : true ,
28
- } ;
21
+ export const Example : Story = { } ;
You can’t perform that action at this time.
0 commit comments