Skip to content

Commit 2800c67

Browse files
committed
Refactor Margins stories
1 parent c4cd628 commit 2800c67

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
import { ComponentMeta, Story } from "@storybook/react";
1+
import type { Meta, StoryObj } from "@storybook/react";
22
import { Margins } from "./Margins";
33

4-
export default {
4+
const meta: Meta<typeof Margins> = {
55
title: "components/Margins",
66
component: Margins,
7-
} as ComponentMeta<typeof Margins>;
7+
};
88

9-
const Template: Story = (args) => (
10-
<Margins {...args}>
11-
<div style={{ width: "100%", background: "black" }}>
12-
Here is some content that will not get too wide!
13-
</div>
14-
</Margins>
15-
);
9+
export default meta;
10+
type Story = StoryObj<typeof Margins>;
1611

17-
export const Example = Template.bind({});
12+
export const Example: Story = {
13+
args: {
14+
children: (
15+
<div style={{ width: "100%", background: "black" }}>
16+
Here is some content that will not get too wide!
17+
</div>
18+
),
19+
},
20+
};

0 commit comments

Comments
 (0)