Skip to content

Commit ad81b13

Browse files
committed
Refactor ServiceBanner stories
1 parent b091ef8 commit ad81b13

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed
Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
import { Story } from "@storybook/react";
2-
import { ServiceBannerView, ServiceBannerViewProps } from "./ServiceBannerView";
1+
import type { Meta, StoryObj } from "@storybook/react";
32

4-
export default {
3+
import { ServiceBannerView } from "./ServiceBannerView";
4+
5+
const meta: Meta<typeof ServiceBannerView> = {
56
title: "components/ServiceBannerView",
67
component: ServiceBannerView,
78
};
89

9-
const Template: Story<ServiceBannerViewProps> = (args) => (
10-
<ServiceBannerView {...args} />
11-
);
10+
export default meta;
11+
type Story = StoryObj<typeof ServiceBannerView>;
1212

13-
export const Production = Template.bind({});
14-
Production.args = {
15-
message: "weeeee",
16-
backgroundColor: "#FFFFFF",
13+
export const Production: Story = {
14+
args: {
15+
message: "weeeee",
16+
backgroundColor: "#FFFFFF",
17+
},
1718
};
1819

19-
export const Preview = Template.bind({});
20-
Preview.args = {
21-
message: "weeeee",
22-
backgroundColor: "#000000",
23-
preview: true,
20+
export const Preview: Story = {
21+
args: {
22+
message: "weeeee",
23+
backgroundColor: "#000000",
24+
preview: true,
25+
},
2426
};

0 commit comments

Comments
 (0)