-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: RadioButton 컴포넌트 수정 -value와 label props 분리 * feat: 모임 상세 퍼널 스텝 작성 * feat: 모임 상세 퍼널 스텝 스토리 작성 * refactor: 라디오 옵션 constants로 분리 * refactor: isMaxMemberCountCustom 변수명 수정 - isCustomMemberCount로 수정 * chore: 오탈자 수정 * refactor: 코드리뷰 반영
- Loading branch information
Showing
4 changed files
with
301 additions
and
56 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
38 changes: 36 additions & 2 deletions
38
src/stories/bookGroup/create/funnel/SetUpDetailStep.stories.tsx
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 |
---|---|---|
@@ -1,16 +1,50 @@ | ||
import { FormProvider, useForm } from 'react-hook-form'; | ||
import type { APICreateGroup } from '@/types/group'; | ||
import { getTodayDate } from '@/utils/date'; | ||
|
||
import { SetUpDetailStep } from '@/v1/bookGroup/create/funnel'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import { appLayoutMeta } from '@/stories/meta'; | ||
|
||
const meta: Meta<typeof SetUpDetailStep> = { | ||
title: 'bookGroup/funnel/SetUpDetailStep', | ||
component: SetUpDetailStep, | ||
tags: ['autodocs'], | ||
...appLayoutMeta, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof SetUpDetailStep>; | ||
interface FunnelFormValues extends APICreateGroup { | ||
customMemberCount: string | number; | ||
} | ||
|
||
const SetUpDetailForm = () => { | ||
const methods = useForm<FunnelFormValues>({ | ||
mode: 'all', | ||
defaultValues: { | ||
bookId: 23, | ||
title: '', | ||
introduce: '', | ||
maxMemberCount: 9999, | ||
startDate: getTodayDate(), | ||
endDate: '', | ||
isPublic: false, | ||
hasJoinPasswd: false, | ||
joinQuestion: '', | ||
joinPasswd: '', | ||
}, | ||
}); | ||
|
||
return ( | ||
<FormProvider {...methods}> | ||
<form> | ||
<SetUpDetailStep /> | ||
</form> | ||
</FormProvider> | ||
); | ||
}; | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
render: () => <SetUpDetailForm />, | ||
}; |
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.