mirror of
https://github.com/snowball-tools/snowballtools-base.git
synced 2024-12-22 20:47:44 +00:00
[22/n][Storybook] AuthPage (#61)
This commit is contained in:
commit
41b9ce1096
@ -0,0 +1,45 @@
|
|||||||
|
import type { Meta, StoryObj } from '@storybook/react';
|
||||||
|
import {
|
||||||
|
reactRouterParameters,
|
||||||
|
withRouter,
|
||||||
|
} from 'storybook-addon-remix-react-router';
|
||||||
|
|
||||||
|
import AuthPage from 'pages/AuthPage';
|
||||||
|
|
||||||
|
const meta: Meta<typeof AuthPage> = {
|
||||||
|
title: 'Pages/Auth/AuthPage',
|
||||||
|
component: AuthPage,
|
||||||
|
tags: ['autodocs'],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default meta;
|
||||||
|
|
||||||
|
type Story = StoryObj<typeof meta>;
|
||||||
|
|
||||||
|
export const Login: Story = {
|
||||||
|
decorators: [withRouter],
|
||||||
|
parameters: {
|
||||||
|
reactRouter: reactRouterParameters({
|
||||||
|
location: {
|
||||||
|
pathParams: { userId: 'me' },
|
||||||
|
},
|
||||||
|
routing: {
|
||||||
|
path: '/login',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const SignUp: Story = {
|
||||||
|
decorators: [withRouter],
|
||||||
|
parameters: {
|
||||||
|
reactRouter: reactRouterParameters({
|
||||||
|
location: {
|
||||||
|
pathParams: { userId: 'me' },
|
||||||
|
},
|
||||||
|
routing: {
|
||||||
|
path: '/signup',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user