veza/apps/web/src/features/auth/components/AuthInput.stories.tsx

40 lines
860 B
TypeScript
Raw Normal View History

import type { Meta, StoryObj } from '@storybook/react';
import { AuthInput } from './AuthInput';
const meta = {
title: 'Features/Auth/Components/AuthInput',
component: AuthInput,
tags: ['autodocs'],
argTypes: {
error: { control: 'text' },
label: { control: 'text' },
},
} satisfies Meta<typeof AuthInput>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
label: 'Email',
placeholder: 'name@example.com',
type: 'email',
},
};
export const WithError: Story = {
args: {
label: 'Username',
value: 'invaliduser',
error: 'Username is already taken',
},
};
export const Password: Story = {
args: {
label: 'Password',
type: 'password',
placeholder: '••••••••',
},
};