diff --git a/ui-core/src/stories/Label.stories.tsx b/ui-core/src/stories/Label.stories.tsx new file mode 100644 index 00000000..3a0dfacf --- /dev/null +++ b/ui-core/src/stories/Label.stories.tsx @@ -0,0 +1,55 @@ +import React from 'react'; +import type { Meta, StoryObj } from '@storybook/react'; +import '@osrd-project/ui-core/dist/theme.css'; + +import Label from '../components/inputs/Label'; + +const meta: Meta = { + component: Label, + args: { + htmlFor: 'https://osrd.fr/en/', + text: 'OSRD', + small: true, + }, + decorators: [ + (Story) => ( +
+ +
+ ), + ], + title: 'Core/Label', + tags: ['autodocs'], +}; + +export default meta; + +type LabelStory = StoryObj; + +export const Default: LabelStory = { + args: {}, +}; + +export const Hint: LabelStory = { + args: { + hasHint: true, + }, +}; + +export const Required: LabelStory = { + args: { + required: true, + }, +}; + +export const Disabled: LabelStory = { + args: { + disabled: true, + }, +}; + +export const Large: LabelStory = { + args: { + small: false, + }, +};