feat: link between stories
Right now this works with Template stories but not with Page stories to collect feedback. Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This commit is contained in:
parent
87af757874
commit
30edc92522
3 changed files with 29 additions and 5 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import { withActions } from '@storybook/addon-actions/decorator';
|
||||||
|
import { withLinks } from '@storybook/addon-links';
|
||||||
import type { Meta, StoryObj } from '@storybook/svelte';
|
import type { Meta, StoryObj } from '@storybook/svelte';
|
||||||
|
|
||||||
import LoginForm from '$lib/components/organisms/LoginForm.svelte';
|
import LoginForm from '$lib/components/organisms/LoginForm.svelte';
|
||||||
|
@ -6,11 +8,17 @@ const meta = {
|
||||||
title: 'Organisms/LoginForm',
|
title: 'Organisms/LoginForm',
|
||||||
component: LoginForm,
|
component: LoginForm,
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
|
args: {
|
||||||
|
sb: 'Templates/Profile'
|
||||||
|
},
|
||||||
argTypes: {
|
argTypes: {
|
||||||
form: { controls: 'object' },
|
form: { controls: 'object' },
|
||||||
i18n: { controls: 'object' },
|
i18n: { controls: 'object' },
|
||||||
|
onSubmit: { action: 'submit' },
|
||||||
|
sb: { control: 'radio', options: ['Templates/Profile'] },
|
||||||
servers: { controls: 'object' }
|
servers: { controls: 'object' }
|
||||||
}
|
},
|
||||||
|
decorators: [withActions, withLinks]
|
||||||
} satisfies Meta<LoginForm>;
|
} satisfies Meta<LoginForm>;
|
||||||
|
|
||||||
export default meta;
|
export default meta;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { withActions } from '@storybook/addon-actions/decorator';
|
||||||
|
import { withLinks } from '@storybook/addon-links';
|
||||||
import type { Meta, StoryObj } from '@storybook/svelte';
|
import type { Meta, StoryObj } from '@storybook/svelte';
|
||||||
|
|
||||||
import Login from '$lib/components/templates/Login.svelte';
|
import Login from '$lib/components/templates/Login.svelte';
|
||||||
|
@ -6,9 +8,15 @@ const meta = {
|
||||||
title: 'Templates/Login',
|
title: 'Templates/Login',
|
||||||
component: Login,
|
component: Login,
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
|
args: {
|
||||||
|
sb: 'Templates/Profile'
|
||||||
|
},
|
||||||
argTypes: {
|
argTypes: {
|
||||||
form: { controls: 'object' }
|
onSubmit: { action: 'submit' },
|
||||||
}
|
form: { controls: 'object' },
|
||||||
|
sb: { control: 'radio', options: ['Templates/Profile'] }
|
||||||
|
},
|
||||||
|
decorators: [withActions, withLinks]
|
||||||
} satisfies Meta<Login>;
|
} satisfies Meta<Login>;
|
||||||
|
|
||||||
export default meta;
|
export default meta;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { withActions } from '@storybook/addon-actions/decorator';
|
||||||
|
import { withLinks } from '@storybook/addon-links';
|
||||||
import type { Meta, StoryObj } from '@storybook/svelte';
|
import type { Meta, StoryObj } from '@storybook/svelte';
|
||||||
|
|
||||||
import Profile from '$lib/components/templates/Profile.svelte';
|
import Profile from '$lib/components/templates/Profile.svelte';
|
||||||
|
@ -6,9 +8,15 @@ const meta = {
|
||||||
title: 'Templates/Profile',
|
title: 'Templates/Profile',
|
||||||
component: Profile,
|
component: Profile,
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
|
args: {
|
||||||
|
sb: 'Templates/ImportProject'
|
||||||
|
},
|
||||||
argTypes: {
|
argTypes: {
|
||||||
data: { controls: 'object' }
|
onClick: { action: 'click' },
|
||||||
}
|
data: { controls: 'object' },
|
||||||
|
sb: { control: 'radio', options: ['Templates/ImportProject'] }
|
||||||
|
},
|
||||||
|
decorators: [withActions, withLinks]
|
||||||
} satisfies Meta<Profile>;
|
} satisfies Meta<Profile>;
|
||||||
|
|
||||||
export default meta;
|
export default meta;
|
||||||
|
|
Loading…
Reference in a new issue