Skip to content

Commit a8bb51c

Browse files
committed
Refactor DeploymentBannerView stories
1 parent 86c76e5 commit a8bb51c

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed
Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
import { Story } from "@storybook/react";
1+
import type { Meta, StoryObj } from "@storybook/react";
22
import { MockDeploymentStats } from "testHelpers/entities";
3-
import {
4-
DeploymentBannerView,
5-
DeploymentBannerViewProps,
6-
} from "./DeploymentBannerView";
3+
import { DeploymentBannerView } from "./DeploymentBannerView";
74

8-
export default {
5+
const meta: Meta<typeof DeploymentBannerView> = {
96
title: "components/DeploymentBannerView",
107
component: DeploymentBannerView,
8+
args: {
9+
stats: MockDeploymentStats,
10+
},
1111
};
1212

13-
const Template: Story<DeploymentBannerViewProps> = (args) => (
14-
<DeploymentBannerView {...args} />
15-
);
13+
export default meta;
14+
type Story = StoryObj<typeof DeploymentBannerView>;
1615

17-
export const Preview = Template.bind({});
18-
Preview.args = {
19-
stats: MockDeploymentStats,
20-
};
16+
export const Preview: Story = {};

0 commit comments

Comments
 (0)