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 LoginForm from '$lib/components/organisms/LoginForm.svelte';
|
||||
|
@ -6,11 +8,17 @@ const meta = {
|
|||
title: 'Organisms/LoginForm',
|
||||
component: LoginForm,
|
||||
tags: ['autodocs'],
|
||||
args: {
|
||||
sb: 'Templates/Profile'
|
||||
},
|
||||
argTypes: {
|
||||
form: { controls: 'object' },
|
||||
i18n: { controls: 'object' },
|
||||
onSubmit: { action: 'submit' },
|
||||
sb: { control: 'radio', options: ['Templates/Profile'] },
|
||||
servers: { controls: 'object' }
|
||||
}
|
||||
},
|
||||
decorators: [withActions, withLinks]
|
||||
} satisfies Meta<LoginForm>;
|
||||
|
||||
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 Login from '$lib/components/templates/Login.svelte';
|
||||
|
@ -6,9 +8,15 @@ const meta = {
|
|||
title: 'Templates/Login',
|
||||
component: Login,
|
||||
tags: ['autodocs'],
|
||||
args: {
|
||||
sb: 'Templates/Profile'
|
||||
},
|
||||
argTypes: {
|
||||
form: { controls: 'object' }
|
||||
}
|
||||
onSubmit: { action: 'submit' },
|
||||
form: { controls: 'object' },
|
||||
sb: { control: 'radio', options: ['Templates/Profile'] }
|
||||
},
|
||||
decorators: [withActions, withLinks]
|
||||
} satisfies Meta<Login>;
|
||||
|
||||
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 Profile from '$lib/components/templates/Profile.svelte';
|
||||
|
@ -6,9 +8,15 @@ const meta = {
|
|||
title: 'Templates/Profile',
|
||||
component: Profile,
|
||||
tags: ['autodocs'],
|
||||
args: {
|
||||
sb: 'Templates/ImportProject'
|
||||
},
|
||||
argTypes: {
|
||||
data: { controls: 'object' }
|
||||
}
|
||||
onClick: { action: 'click' },
|
||||
data: { controls: 'object' },
|
||||
sb: { control: 'radio', options: ['Templates/ImportProject'] }
|
||||
},
|
||||
decorators: [withActions, withLinks]
|
||||
} satisfies Meta<Profile>;
|
||||
|
||||
export default meta;
|
||||
|
|
Loading…
Reference in a new issue