Skip to content

Commit

Permalink
[FE][Docs] #59 : AuthModal Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
juwon5272 committed Nov 16, 2024
1 parent 35bbc55 commit 6bd55e6
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions frontend/src/stories/AuthModal.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import React from 'react';
import { Meta, Story } from '@storybook/react';
import { useModal } from '@/hooks/useModal';
import { AuthModal } from '@/component/authmodal/AuthModal';

export default {
title: 'Components/AuthModal',
component: AuthModal,
parameters: {
layout: 'fullscreen',
},
tags: ['autodocs'],
} as Meta<typeof AuthModal>;

const LoginModalTemplate: Story = args => {
const { onClose } = useModal();

return <AuthModal {...args} onClose={onClose} />;
};

const RegisterModalTemplate: Story = args => {
const { onClose } = useModal();

return <AuthModal {...args} onClose={onClose} />;
};

export const LoginModal = LoginModalTemplate.bind({});
LoginModal.args = {
isOpen: true,
type: 'login',
};
LoginModal.parameters = {
docs: {
description: {
story: '๋กœ๊ทธ์ธ ๋ชจ๋‹ฌ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋ Œ๋”๋งํ•ฉ๋‹ˆ๋‹ค.',
},
},
backgrounds: {
default: 'gray',
values: [{ name: 'gray', value: '#f3f4f6' }],
},
};

export const RegisterModal = RegisterModalTemplate.bind({});
RegisterModal.args = {
isOpen: true,
type: 'register',
};
RegisterModal.parameters = {
docs: {
description: {
story: 'ํšŒ์›๊ฐ€์ž… ๋ชจ๋‹ฌ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋ Œ๋”๋งํ•ฉ๋‹ˆ๋‹ค.',
},
},
backgrounds: {
default: 'gray',
values: [{ name: 'gray', value: '#f3f4f6' }],
},
};

0 comments on commit 6bd55e6

Please sign in to comment.