Files
cunningham/packages/react/src/components/Forms/LabelledBox/index.stories.tsx
Nathan Vasse df57fb8a57 ♻️(react) create a generic LabelledBox
This component is responsible to display the label as placeholder for forms
input. It was tied inside Input but now we will need to have the same ui
for Select field, by extracting it in a dedicated component we make it
reusable quickly.
2023-05-12 11:13:38 +02:00

21 lines
590 B
TypeScript

import { ComponentMeta, ComponentStory } 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>;
const Template: ComponentStory<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>,
};