-
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.
feat : 편지 작성 모달 개발 및 성공 페이지 개발 (#149)
* chore : 스토리북 라우터 제거 * feat : 모달 컴포넌트 구현 * story : 모달 스토리 수정 * feat : 성공 페이지 개발 * chore : router 수정 * story : 스토리 라우팅 수정 * chore : snapPoint 수정 * chore : 스토리 수정 * story : story 수정 * story : 스토리 오류 수정
- Loading branch information
Showing
15 changed files
with
216 additions
and
69 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,17 +1,29 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { SelectItem } from './SelectItem'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
import React, { useState } from 'react'; | ||
|
||
const meta: Meta<typeof SelectItem> = { | ||
component: SelectItem, | ||
title: 'organisms/moSelectItem', | ||
title: 'organisms/SelectItem', | ||
tags: ['autodocs'], | ||
argTypes: {} | ||
argTypes: {}, | ||
decorators: [ | ||
(Story) => ( | ||
<MemoryRouter initialEntries={['/']}> | ||
<Story /> | ||
</MemoryRouter> | ||
) | ||
] | ||
}; | ||
export default meta; | ||
|
||
type Story = StoryObj<typeof SelectItem>; | ||
|
||
export const Default: Story = { | ||
args: {} | ||
render: () => { | ||
const [isActive, setIsActive] = useState(false); | ||
|
||
return <SelectItem isActive={isActive} setIsActive={setIsActive} />; | ||
} | ||
}; |
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
24 changes: 24 additions & 0 deletions
24
src/components/Letter/SuccessModal/SuccessModal.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { SuccessModal } from './SuccessModal'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
|
||
const meta: Meta<typeof SuccessModal> = { | ||
component: SuccessModal, | ||
title: 'atoms/SuccessModal', | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
decorators: [ | ||
(Story) => ( | ||
<MemoryRouter initialEntries={['/']}> | ||
<Story /> | ||
</MemoryRouter> | ||
) | ||
] | ||
}; | ||
export default meta; | ||
|
||
type Story = StoryObj<typeof SuccessModal>; | ||
|
||
export const Default: Story = { | ||
args: {} | ||
}; |
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,13 @@ | ||
import { Margin } from '@/components/Common/Margin/Margin'; | ||
import React from 'react'; | ||
|
||
export const SuccessModal = () => { | ||
return ( | ||
<div className="flex flex-col items-center justify-center w-56 h-40 m-auto text-xl rounded-3xl animate-fade-up bg-slate-200 "> | ||
<img src="/public/폭죽.png" className="w-12 h-12" /> | ||
<Margin top={10} /> | ||
<span>성공적으로</span> | ||
<span>발송되었습니다</span> | ||
</div> | ||
); | ||
}; |
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
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,24 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
import { SelectItemPage } from './SelectItemPage'; | ||
|
||
const meta: Meta<typeof SelectItemPage> = { | ||
component: SelectItemPage, | ||
title: 'SelectItemPage', | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
decorators: [ | ||
(Story) => ( | ||
<MemoryRouter> | ||
<Story /> | ||
</MemoryRouter> | ||
) | ||
] | ||
}; | ||
export default meta; | ||
|
||
type Story = StoryObj<typeof SelectItemPage>; | ||
|
||
export const Default: Story = { | ||
args: {} | ||
}; |
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,21 @@ | ||
import { Margin } from '@/components/Common/Margin/Margin'; | ||
import { CreateButton } from '@/components/Letter/CreateButton/CreateButton'; | ||
import { SuccessModal } from '@/components/Letter/SuccessModal/SuccessModal'; | ||
import React from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
export const SuccessLetterPage = () => { | ||
const navigate = useNavigate(); | ||
|
||
const handleClick = () => { | ||
navigate('/'); | ||
}; | ||
return ( | ||
<div className="w-[375px] max-w-[768px] max-h-[815px]"> | ||
<Margin top={210} /> | ||
<SuccessModal /> | ||
<Margin top={230} /> | ||
<CreateButton isActive={true} handleClickHandler={handleClick} /> | ||
</div> | ||
); | ||
}; |
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.