[21/n][Storybook] AuthPage

This commit is contained in:
Vivian Phung 2024-05-14 19:10:30 -04:00 committed by Vivian Phung
parent ca8863e1d6
commit ad69ebe4a0

View File

@ -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',
},
}),
},
};