39 lines
871 B
TypeScript
39 lines
871 B
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import { AuthInput } from './AuthInput';
|
|
|
|
const meta = {
|
|
title: 'Components/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: '••••••••',
|
|
},
|
|
};
|