Skip to content

Commit 70ef3da

Browse files
committed
Refactor DeleteDialog stories
1 parent dab8aab commit 70ef3da

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed
Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
11
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";
44

5-
export default {
6-
title: "Components/Dialogs/DeleteDialog",
5+
const meta: Meta<typeof DeleteDialog> = {
6+
title: "components/Dialogs/DeleteDialog",
77
component: DeleteDialog,
8-
argTypes: {
9-
open: {
10-
control: "boolean",
11-
},
12-
},
138
args: {
149
onCancel: action("onClose"),
1510
onConfirm: action("onConfirm"),
16-
open: true,
11+
isOpen: true,
1712
entity: "foo",
1813
name: "MyFoo",
1914
info: "Here's some info about the foo so you know you're deleting the right one.",
2015
},
21-
} as ComponentMeta<typeof DeleteDialog>;
16+
};
2217

23-
const Template: Story<DeleteDialogProps> = (args) => <DeleteDialog {...args} />;
18+
export default meta;
19+
type Story = StoryObj<typeof DeleteDialog>;
2420

25-
export const Example = Template.bind({});
26-
Example.args = {
27-
isOpen: true,
28-
};
21+
export const Example: Story = {};

0 commit comments

Comments
 (0)