File tree 1 file changed +19
-18
lines changed 1 file changed +19
-18
lines changed Original file line number Diff line number Diff line change 1
- import { ComponentMeta , Story } from "@storybook/react " ;
2
- import { FormFooter , FormFooterProps } from "./FormFooter " ;
1
+ import { FormFooter } from "./FormFooter " ;
2
+ import type { Meta , StoryObj } from "@storybook/react " ;
3
3
4
- export default {
4
+ const meta : Meta < typeof FormFooter > = {
5
5
title : "components/FormFooter" ,
6
6
component : FormFooter ,
7
- argTypes : {
8
- onCancel : { action : "cancel" } ,
9
- } ,
10
- } as ComponentMeta < typeof FormFooter > ;
7
+ } ;
11
8
12
- const Template : Story < FormFooterProps > = ( args ) => < FormFooter { ...args } /> ;
9
+ export default meta ;
10
+ type Story = StoryObj < typeof FormFooter > ;
13
11
14
- export const Ready = Template . bind ( { } ) ;
15
- Ready . args = {
16
- isLoading : false ,
12
+ export const Ready : Story = {
13
+ args : {
14
+ isLoading : false ,
15
+ } ,
17
16
} ;
18
17
19
- export const Custom = Template . bind ( { } ) ;
20
- Custom . args = {
21
- isLoading : false ,
22
- submitLabel : "Create" ,
18
+ export const Custom : Story = {
19
+ args : {
20
+ isLoading : false ,
21
+ submitLabel : "Create" ,
22
+ } ,
23
23
} ;
24
24
25
- export const Loading = Template . bind ( { } ) ;
26
- Loading . args = {
27
- isLoading : true ,
25
+ export const Loading : Story = {
26
+ args : {
27
+ isLoading : true ,
28
+ } ,
28
29
} ;
You can’t perform that action at this time.
0 commit comments