♻️(react) migrate to Storybook 7
This new release comes with breaking changes for stories and mdx docs.
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
||||
import { Meta, StoryFn } from "@storybook/react";
|
||||
import React from "react";
|
||||
import { LabelledBox } from ":/components/Forms/LabelledBox/index";
|
||||
|
||||
export default {
|
||||
title: "Components/Forms/LabelledBox",
|
||||
component: LabelledBox,
|
||||
} as ComponentMeta<typeof LabelledBox>;
|
||||
} as Meta<typeof LabelledBox>;
|
||||
|
||||
const Template: ComponentStory<typeof LabelledBox> = (args) => (
|
||||
const Template: StoryFn<typeof LabelledBox> = (args) => (
|
||||
<div style={{ height: "3.5rem" }}>
|
||||
<LabelledBox {...args} />
|
||||
</div>
|
||||
);
|
||||
|
||||
export const Default = Template.bind({});
|
||||
Default.args = {
|
||||
label: "Your label here",
|
||||
children: <span className="clr-greyscale-800">Hello world</span>,
|
||||
export const Default = {
|
||||
render: Template,
|
||||
|
||||
args: {
|
||||
label: "Your label here",
|
||||
children: <span className="clr-greyscale-800">Hello world</span>,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user