Skip to content

Commit

Permalink
feat: QuizProblemStopModal story 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-553 committed Sep 7, 2024
1 parent e582d0c commit 5ee3674
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/components/common/Modal/Modal.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react'
import type { Meta, StoryObj } from '@storybook/react'
import QuizProblemStopModal from '@/components/shared/QuizProblemStopModal'
import Modal from '.'

const meta: Meta<typeof Modal> = {
Expand All @@ -21,3 +23,17 @@ export const Default: Story = {
children: 'Modal',
},
}

export const QuizProblemStopModalStory: Story = {
render: () => {
return (
<>
<QuizProblemStopModal
isModalOpen={true}
totalProblem={5}
currentProblem={2}
/>
</>
)
},
}
4 changes: 3 additions & 1 deletion src/components/shared/QuizProblemStopModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export default function QuizProblemStopModal({
</div>

<div className="flex justify-between">
<Button type={'light'}>계속할게요</Button>
<Button type={'light'} onClick={() => !isModalOpen}>
계속할게요
</Button>
<Button type={'gradient'}>그만할게요</Button>
</div>
</Modal>
Expand Down

0 comments on commit 5ee3674

Please sign in to comment.