add eslint / prettier
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-23 14:19:16 +01:00
parent 01b00b5717
commit c2e370f0a8
34 changed files with 1305 additions and 470 deletions

View File

@@ -12,35 +12,36 @@ const meta = {
parameters: {
docs: {
description: {
component: 'Surface container with a title bar and a responsive content grid, intended for CMS forms.'
}
}
component:
'Surface container with a title bar and a responsive content grid, intended for CMS forms.',
},
},
},
argTypes: {
title: {
description: 'Form title displayed in the header bar.',
control: 'text',
table: { type: { summary: 'string' } }
table: { type: { summary: 'string' } },
},
titleBarRight: {
description: 'Optional node rendered on the right side of the title bar.',
control: false,
table: { type: { summary: 'ReactNode' } }
table: { type: { summary: 'ReactNode' } },
},
children: {
description: 'Form content rendered inside the responsive grid.',
control: false,
table: { type: { summary: 'ReactNode' } }
table: { type: { summary: 'ReactNode' } },
},
className: {
description: 'Extra CSS classes for the root container.',
control: 'text',
table: { type: { summary: 'string' } }
}
table: { type: { summary: 'string' } },
},
},
args: {
title: 'Post details'
}
title: 'Post details',
},
} satisfies Meta<typeof Form>;
export default meta;
@@ -56,13 +57,13 @@ export const Basic: Story = {
value="draft"
choices={[
{ id: 'draft', label: 'Draft' },
{ id: 'published', label: 'Published' }
{ id: 'published', label: 'Published' },
]}
/>
<InputField label="Slug" type="text" value="a-short-post-title" />
</>
)
}
),
},
};
export const WithActions: Story = {
@@ -71,10 +72,7 @@ export const WithActions: Story = {
const [status, setStatus] = useState('draft');
return (
<Form
{...args}
titleBarRight={<Button type="solid" size="sm" label="Save" />}
>
<Form {...args} titleBarRight={<Button type="solid" size="sm" label="Save" />}>
<div className="col-span-2">
<InputField
label="Title"
@@ -91,11 +89,11 @@ export const WithActions: Story = {
choices={[
{ id: 'draft', label: 'Draft' },
{ id: 'review', label: 'In review' },
{ id: 'published', label: 'Published' }
{ id: 'published', label: 'Published' },
]}
/>
<InputField label="Slug" type="text" value="storybook-powered-cms" />
</Form>
);
}
},
};