Bring back autodocs

This commit is contained in:
2025-04-07 21:49:32 +01:00
parent d61379ac2d
commit cb13c7ba70
19 changed files with 28 additions and 15 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['!autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {
text: { control: 'text' }, text: { control: 'text' },
color: { options: ['primary', 'secondary', 'tertiary'] }, color: { options: ['primary', 'secondary', 'tertiary'] },
+3 -1
View File
@@ -8,6 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'],
argTypes: { argTypes: {
text: { control: 'text' }, text: { control: 'text' },
color: { options: ['primary', 'secondary', 'tertiary'] }, color: { options: ['primary', 'secondary', 'tertiary'] },
@@ -22,6 +23,7 @@ type Story = StoryObj<typeof meta>;
export const Example: Story = { export const Example: Story = {
args: { args: {
text: 'A', text: 'A',
color: 'tertiary' color: 'primary',
size: 'big'
}, },
}; };
+1
View File
@@ -8,6 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'],
argTypes: { argTypes: {
color: { control: 'text' }, color: { control: 'text' },
children: { control: 'text' }, children: { control: 'text' },
+2 -1
View File
@@ -8,6 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primary', 'secondary', 'tertiary', 'error'] }, color: { options: ['primary', 'secondary', 'tertiary', 'error'] },
text: { control: 'text' }, text: { control: 'text' },
@@ -20,7 +21,7 @@ type Story = StoryObj<typeof meta>;
export const Example: Story = { export const Example: Story = {
args: { args: {
color: 'secondary', color: 'primary',
text: 'Hello, World!', text: 'Hello, World!',
variant: 'primary-action' variant: 'primary-action'
}, },
+2 -1
View File
@@ -8,6 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primary', 'secondary', 'tertiary', 'error'] }, color: { options: ['primary', 'secondary', 'tertiary', 'error'] },
}, },
@@ -19,7 +20,7 @@ type Story = StoryObj<typeof meta>;
export const Example: Story = { export const Example: Story = {
args: { args: {
color: 'secondary', color: 'primary',
title: 'Card title', title: 'Card title',
description: 'Card description', description: 'Card description',
selected: true selected: true
+1 -1
View File
@@ -8,7 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['!autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primary', 'secondary', 'tertiary'] }, color: { options: ['primary', 'secondary', 'tertiary'] },
label: { control: 'text' }, label: { control: 'text' },
+2 -1
View File
@@ -8,6 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primary', 'secondary', 'tertiary'] }, color: { options: ['primary', 'secondary', 'tertiary'] },
text: { control: 'text' }, text: { control: 'text' },
@@ -21,7 +22,7 @@ type Story = StoryObj<typeof meta>;
export const Example: Story = { export const Example: Story = {
args: { args: {
color: 'tertiary', color: 'primary',
text: 'Hello, World!', text: 'Hello, World!',
variant: 'filled' variant: 'filled'
}, },
@@ -6,6 +6,7 @@ import Box from '../Box';
const meta = { const meta = {
title: 'ContextMenu', title: 'ContextMenu',
component: ContextMenu, component: ContextMenu,
tags: ['autodocs'],
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
+3 -3
View File
@@ -9,7 +9,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['!autodocs'], tags: ['autodocs'],
} satisfies Meta<typeof IconButton>; } satisfies Meta<typeof IconButton>;
export default meta; export default meta;
@@ -20,9 +20,9 @@ export const Example: Story = {
render: () => { render: () => {
return ( return (
<IconButton <IconButton
color='secondary' color='primary'
icon={<Add />} icon={<Add />}
size='medium' size='big'
onClick={() => window.alert('Hello, World!')} onClick={() => window.alert('Hello, World!')}
/> />
) )
@@ -6,6 +6,7 @@ import ImagePreview, {ImagePreviewProps} from '.';
const meta = { const meta = {
title: 'ImagePreview', title: 'ImagePreview',
component: ImagePreview, component: ImagePreview,
tags: ['autodocs'],
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
+1
View File
@@ -8,6 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primary', 'secondary', 'tertiary'] }, color: { options: ['primary', 'secondary', 'tertiary'] },
}, },
+2 -2
View File
@@ -8,7 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['!autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['success', 'error', 'warning', 'black'] }, color: { options: ['success', 'error', 'warning', 'black'] },
}, },
@@ -20,7 +20,7 @@ type Story = StoryObj<typeof meta>;
export const Example: Story = { export const Example: Story = {
args: { args: {
color: 'success', color: 'primary',
children: 'Link', children: 'Link',
url: true, url: true,
href: 'https://hazemkrimi.tech', href: 'https://hazemkrimi.tech',
+1 -1
View File
@@ -11,7 +11,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['!autodocs'], tags: ['autodocs'],
} satisfies Meta<typeof Menu>; } satisfies Meta<typeof Menu>;
export default meta; export default meta;
+1
View File
@@ -8,6 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primary', 'secondary', 'tertiary', 'error'] }, color: { options: ['primary', 'secondary', 'tertiary', 'error'] },
title: { control: 'text' }, title: { control: 'text' },
+1
View File
@@ -8,6 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primary', 'secondary', 'tertiary', 'error'] }, color: { options: ['primary', 'secondary', 'tertiary', 'error'] },
value: { control: 'text' }, value: { control: 'text' },
+2 -1
View File
@@ -8,6 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primary', 'secondary', 'tertiary', 'admin', 'error'] }, color: { options: ['primary', 'secondary', 'tertiary', 'admin', 'error'] },
value: { control: 'text' }, value: { control: 'text' },
@@ -20,7 +21,7 @@ type Story = StoryObj<typeof meta>;
export const Example: Story = { export const Example: Story = {
args: { args: {
color: 'secondary', color: 'primary',
value: '', value: '',
options: [ options: [
{ value: '1', label: 'Option 1' }, { value: '1', label: 'Option 1' },
+1 -1
View File
@@ -8,7 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['!autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primay', 'secondary', 'tertiary', 'error'] }, color: { options: ['primay', 'secondary', 'tertiary', 'error'] },
}, },
+1 -1
View File
@@ -8,7 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['!autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primary', 'secondary', 'tertiary', 'error'] }, color: { options: ['primary', 'secondary', 'tertiary', 'error'] },
variant: { options: ['display', 'headline', 'title', 'subheader', 'body', 'caption'] }, variant: { options: ['display', 'headline', 'title', 'subheader', 'body', 'caption'] },
+1
View File
@@ -8,6 +8,7 @@ const meta = {
parameters: { parameters: {
layout: 'centered', layout: 'centered',
}, },
tags: ['autodocs'],
argTypes: { argTypes: {
color: { options: ['primary', 'secondary', 'tertiary', 'error'] }, color: { options: ['primary', 'secondary', 'tertiary', 'error'] },
}, },