♻️(react) migrate to Storybook 7

This new release comes with breaking changes for stories and mdx docs.
This commit is contained in:
Nathan Vasse
2023-05-12 16:03:16 +02:00
committed by NathanVss
parent e7fc782b1c
commit 77721c3b6d
24 changed files with 2639 additions and 4187 deletions

View File

@@ -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>,
},
};