From 0b3146f7278929c4d1b33dd8f94f34e351e5e5a9 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 8 Apr 2022 22:36:24 +0200 Subject: chore: add a Settings modal component --- src/components/atoms/forms/label.stories.tsx | 42 ++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 5 deletions(-) (limited to 'src/components/atoms/forms/label.stories.tsx') diff --git a/src/components/atoms/forms/label.stories.tsx b/src/components/atoms/forms/label.stories.tsx index 06e8eb9..463e8ac 100644 --- a/src/components/atoms/forms/label.stories.tsx +++ b/src/components/atoms/forms/label.stories.tsx @@ -4,7 +4,24 @@ import LabelComponent from './label'; export default { title: 'Atoms/Forms', component: LabelComponent, + args: { + required: false, + size: 'small', + }, argTypes: { + className: { + control: { + type: 'text', + }, + description: 'Add classnames to the label.', + table: { + category: 'Styles', + }, + type: { + name: 'string', + required: false, + }, + }, children: { control: { type: 'text', @@ -32,22 +49,37 @@ export default { description: 'Set to true if the field is required.', table: { category: 'Options', + defaultValue: { summary: false }, }, type: { name: 'boolean', required: false, }, }, + size: { + control: { + type: 'select', + }, + description: 'The label size.', + options: ['medium', 'small'], + table: { + category: 'Options', + defaultValue: { summary: 'small' }, + }, + type: { + name: 'string', + required: false, + }, + }, }, } as ComponentMeta; -const Template: ComponentStory = (args) => { - const { children, ...props } = args; - return {children}; -}; +const Template: ComponentStory = ({ + children, + ...args +}) => {children}; export const Label = Template.bind({}); Label.args = { children: 'A label', - htmlFor: 'a-field-id', }; -- cgit v1.2.3