Skip to content

Commit e41349c

Browse files
committed
Refactor FormFooter stories
1 parent bb13012 commit e41349c

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed
Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
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";
33

4-
export default {
4+
const meta: Meta<typeof FormFooter> = {
55
title: "components/FormFooter",
66
component: FormFooter,
7-
argTypes: {
8-
onCancel: { action: "cancel" },
9-
},
10-
} as ComponentMeta<typeof FormFooter>;
7+
};
118

12-
const Template: Story<FormFooterProps> = (args) => <FormFooter {...args} />;
9+
export default meta;
10+
type Story = StoryObj<typeof FormFooter>;
1311

14-
export const Ready = Template.bind({});
15-
Ready.args = {
16-
isLoading: false,
12+
export const Ready: Story = {
13+
args: {
14+
isLoading: false,
15+
},
1716
};
1817

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+
},
2323
};
2424

25-
export const Loading = Template.bind({});
26-
Loading.args = {
27-
isLoading: true,
25+
export const Loading: Story = {
26+
args: {
27+
isLoading: true,
28+
},
2829
};

0 commit comments

Comments
 (0)