Skip to content

Commit

Permalink
feat: 다이얼로그 컴포넌트 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
miro-ring committed Jan 16, 2024
1 parent 57d5fd0 commit c3268ae
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions src/components/Dialog/Dialog.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import Icon from '@components/Icon';
import type { Meta, StoryObj } from '@storybook/react';

import Dialog from '.';
import * as styles from './style.css';

const meta: Meta<typeof Dialog> = {
title: 'Components/Dialog',
component: Dialog,
parameters: {
componentSubtitle: '다양한 액션을 제공하는 컴포넌트',
},
};

export default meta;

type Story = StoryObj<typeof Dialog>;

export const Small: Story = {
render: () => (
<>
<Dialog type="small">
<Dialog.Button onClick={() => {}}>수정하기</Dialog.Button>
<Dialog.Button onClick={() => {}}>삭제하기</Dialog.Button>
</Dialog>
</>
),
};

export const MediumFolder: Story = {
render: () => (
<>
<Dialog type="medium">
<Dialog.Button onClick={() => {}}>
OOO님의 폴더<span className={styles.badge}>기본</span>
</Dialog.Button>
<Dialog.Button onClick={() => {}}>폴더 이름1</Dialog.Button>
<Dialog.Button onClick={() => {}}>폴더 이름2</Dialog.Button>
<Dialog.Button onClick={() => {}}>
<Icon className={styles.addIcon} icon="add" />
<span className={styles.iconMediumText}>새 폴더 만들기</span>
</Dialog.Button>
</Dialog>
</>
),
};

export const MediumProfile: Story = {
render: () => (
<>
<Dialog type="medium">
<Dialog.Title>
<Icon className={styles.profileIcon} icon="profileDialog" />
<div className={styles.circle} />
<span className={styles.iconTitleText}>바로가나다라마바님</span>
</Dialog.Title>
<Dialog.Button onClick={() => {}}>
<Icon className={styles.addIcon} icon="setting" />
<span className={styles.iconRegularText}>계정 설정</span>
</Dialog.Button>
<Dialog.Button onClick={() => {}}>
<Icon className={styles.addIcon} icon="logout" />
<span className={styles.iconRegularText}>로그아웃</span>
</Dialog.Button>
</Dialog>
</>
),
};

0 comments on commit c3268ae

Please sign in to comment.