-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
14 changed files
with
205 additions
and
20 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
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
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
32 changes: 32 additions & 0 deletions
32
src/domain/photo/UploadPhoto/components/AddPhotoIntoAlbum.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,32 @@ | ||
import { ReactComponent as ArrowDownIcon } from '@/assets/arrow-down.svg'; | ||
import { IconButton } from '@/domain/_common/components'; | ||
import { Dropdown } from '@/domain/_common/components/Dropdown'; | ||
import Bubble from '@/domain/_common/components/NoticeBubble'; | ||
|
||
const sampleAlbumInfo = { id: '이건 내 엘범이야', link: 'https://ifh.cc/g/ySOj5R.jpg' }; | ||
|
||
export default function AddPhotoIntoAlbum() { | ||
return ( | ||
<> | ||
<div className="flex flex-col gap-1 items-start justify-center relative pb-2"> | ||
<Bubble message="추억을 저장할 공간을 선택해주세요" className="z-30 fixed" /> | ||
<div className="flex flex-row justify-start gap-3 items-center"> | ||
<Dropdown className="relative"> | ||
<Dropdown.Trigger> | ||
<IconButton text="일상" icon={<ArrowDownIcon />} className="py-1 text-lg" /> | ||
</Dropdown.Trigger> | ||
<Dropdown.List className="z-20 absolute"> | ||
<Dropdown.Item>앨범이름 1</Dropdown.Item> | ||
<Dropdown.Item>앨범이름 2</Dropdown.Item> | ||
<Dropdown.Item>앨범이름 3</Dropdown.Item> | ||
</Dropdown.List> | ||
</Dropdown> | ||
<h2 className="font-bold text-[18px]">앨범에 사진 추가</h2> | ||
</div> | ||
</div> | ||
<div className="flex flex-col items-center justify-start h-full w-full py-5"> | ||
<img src={sampleAlbumInfo.link} alt="샘플 사진" className="rounded-2xl h-4/5" /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Checkbox } from '@/domain/_common/components'; | ||
import { useForm } from '@/hooks'; | ||
import { yupSchema } from '@/utils/validation'; | ||
|
||
export default function SelectFrame() { | ||
const { control } = useForm({ | ||
defaultValues: { | ||
checkbox: '', | ||
}, | ||
schema: { | ||
checkbox: yupSchema.requiredString, | ||
}, | ||
mode: 'onChange', | ||
}); | ||
|
||
return ( | ||
<> | ||
<h2 className="font-bold text-[18px] pb-5">프레임 선택</h2> | ||
<ul className="w-full flex flex-col gap-3"> | ||
<li> | ||
<Checkbox type="fatHorizontal" control={control} /> | ||
</li> | ||
<li> | ||
<Checkbox type="fatVertical" control={control} /> | ||
</li> | ||
<li> | ||
<Checkbox type="thinVertical" control={control} /> | ||
</li> | ||
</ul> | ||
</> | ||
); | ||
} |
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,36 @@ | ||
import { TextInput } from '@/domain/_common/components'; | ||
import { useForm } from '@/hooks'; | ||
import { yupSchema } from '@/utils/validation'; | ||
|
||
export default function UploadInfo() { | ||
const { control } = useForm({ | ||
defaultValues: { | ||
value1: '', | ||
}, | ||
schema: { value1: yupSchema.requiredNumber }, | ||
mode: 'onChange', | ||
}); | ||
|
||
return ( | ||
<ul className="w-full flex flex-col gap-10"> | ||
<li className="flex flex-col gap-2"> | ||
<label className="font-bold text-[18px]" htmlFor="date"> | ||
날짜 | ||
</label> | ||
<TextInput name="날짜" label="날짜" control={control} /> | ||
</li> | ||
<li className="flex flex-col gap-2"> | ||
<label className="font-bold text-[18px]" htmlFor="memo"> | ||
메모작성 | ||
</label> | ||
<TextInput name="메모작성" label="메모작성" control={control} /> | ||
</li> | ||
<li className="flex flex-col gap-2"> | ||
<label className="font-bold text-[18px]" htmlFor="tag"> | ||
태그 | ||
</label> | ||
<TextInput name="태그" label="태그" control={control} /> | ||
</li> | ||
</ul> | ||
); | ||
} |
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,42 @@ | ||
import { useState } from 'react'; | ||
|
||
import { Stepper } from '@/domain/_common/components'; | ||
import { Button } from '@/domain/_common/components/Button'; | ||
|
||
import AddPhotoIntoAlbum from './components/AddPhotoIntoAlbum'; | ||
import SelectFrame from './components/SelectFrame'; | ||
import UploadInfo from './components/UploadInfo'; | ||
|
||
export default function UploadPhoto() { | ||
const [step, setStep] = useState(1); | ||
|
||
const handleStepForward = () => { | ||
setStep((prev) => prev + 1); | ||
}; | ||
|
||
const handleStepBackward = () => { | ||
setStep((prev) => prev - 1); | ||
}; | ||
|
||
return ( | ||
<div className="h-full flex flex-col p-10"> | ||
<h1 className="font-bold text-[24px] mb-4">새 사진 등록</h1> | ||
<div className="h-[75%] w-full relative mb-10 flex flex-col justify-center"> | ||
{step === 1 && <AddPhotoIntoAlbum />} | ||
{step === 2 && <SelectFrame />} | ||
{step === 3 && <UploadInfo />} | ||
</div> | ||
<div className="w-full flex flex-col justify-center items-center gap-5"> | ||
<Stepper stepLength={3} activeStep={step} /> | ||
<div className="w-full flex gap-3"> | ||
<Button variant="contained" onClick={handleStepBackward}> | ||
뒤로 가기 | ||
</Button> | ||
<Button color="primary" variant="contained" onClick={handleStepForward}> | ||
다음 | ||
</Button> | ||
</div> | ||
</div> | ||
</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