1
0
Fork 0
Anvil/stories/pages/Login.stories.ts
André Jaenisch dc707869b4
docs: write Story for LoginForm
As it is visible here, part of the layout is deferred to the parent
component. See Login template.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-07-04 08:21:35 +02:00

45 lines
729 B
TypeScript

import type { Meta, StoryObj } from '@storybook/svelte';
import Login from '$lib/components/pages/Login.svelte';
const meta = {
title: 'Pages/Login',
component: Login,
tags: ['autodocs'],
argTypes: {
form: { controls: 'object' }
}
} satisfies Meta<Login>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Plain: Story = {
args: {
form: {
account: 'jane.doe@domain.example',
incorrect: false,
missing: false
}
}
};
export const MissingInput: Story = {
args: {
form: {
account: '',
incorrect: false,
missing: true
}
}
};
export const InvalidFormData: Story = {
args: {
form: {
account: 'jane.doe@domain.example',
incorrect: true,
missing: false
}
}
};