45 lines
1,009 B
TypeScript
45 lines
1,009 B
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
||
import { AuthView, AuthViewSkeleton } from './auth-view';
|
||
|
||
const meta: Meta<typeof AuthView> = {
|
||
title: 'Components/Features/Views/AuthView',
|
||
component: AuthView,
|
||
parameters: { layout: 'fullscreen' },
|
||
tags: ['autodocs'],
|
||
decorators: [
|
||
(Story) => (
|
||
<div className="bg-background min-h-layout-page p-4">
|
||
<Story />
|
||
</div>
|
||
),
|
||
],
|
||
argTypes: {
|
||
initialStep: {
|
||
control: 'select',
|
||
options: ['LOGIN', 'REGISTER', 'VERIFY_EMAIL', 'FORGOT_PASSWORD', 'RESET_PASSWORD'],
|
||
description: 'Étape d’auth initiale',
|
||
},
|
||
},
|
||
};
|
||
|
||
export default meta;
|
||
type Story = StoryObj<typeof meta>;
|
||
|
||
export const Default: Story = {
|
||
name: 'Par défaut (Login)',
|
||
args: {
|
||
initialStep: 'LOGIN',
|
||
},
|
||
};
|
||
|
||
export const Loading: Story = {
|
||
render: () => <AuthViewSkeleton />,
|
||
name: 'Chargement',
|
||
};
|
||
|
||
export const RegisterStep: Story = {
|
||
name: 'Étape Inscription',
|
||
args: {
|
||
initialStep: 'REGISTER',
|
||
},
|
||
};
|