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.
21 lines
590 B
TypeScript
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>,
|
|
};
|