-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7336f0a
commit 0aa0fb3
Showing
4 changed files
with
232 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import { withReactContext } from 'storybook-react-context'; | ||
|
||
import { ModalContext } from '@contexts/ModalContext'; | ||
|
||
import Modal from './Modal'; | ||
|
||
const meta = { | ||
title: 'Shared/Modal', | ||
decorators: [ | ||
withReactContext({ | ||
Context: ModalContext, | ||
initialState: { | ||
open: true, | ||
title: '탈퇴하시겠습니까?', | ||
description: '회원을 탈퇴하면 차량용품 추천 서비스를 제공받을 수 없습니다. 정말로 탈퇴하시겠습니까?', | ||
topButtonLabel: '예', | ||
bottomButtonLabel: '아니오', | ||
onTopButtonClick: () => { }, | ||
onBottomButtonClick: () => { }, | ||
}, | ||
}), | ||
], | ||
component: Modal, | ||
parameters: { | ||
}, | ||
tags: ['autodocs'], | ||
argTypes: { | ||
}, | ||
} satisfies Meta<typeof Modal>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const normal: Story = { | ||
args: { | ||
open: true, | ||
title: '탈퇴하시겠습니까?', | ||
description: '회원을 탈퇴하면 차량용품 추천 서비스를 제공받을 수 없습니다. 정말로 탈퇴하시겠습니까?', | ||
topButtonLabel: '예', | ||
bottomButtonLabel: '아니오', | ||
onTopButtonClick: () => { }, | ||
onBottomButtonClick: () => { }, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.