-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from dnd-side-project/OZ-35-F-pick-page
Feat : 포즈픽 페이지 구현
- Loading branch information
Showing
12 changed files
with
137 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
'use client'; | ||
|
||
import { BottomFixedButton } from '@/components/Button'; | ||
import Image from 'next/image'; | ||
import { useState } from 'react'; | ||
|
||
const countList = ['1인', '2인', '3인', '4인', '5인+']; | ||
|
||
export default function PickSection() { | ||
const [countState, setCountState] = useState<string>('1인'); | ||
|
||
return ( | ||
<section className="flex flex-col "> | ||
<div className="my-16 flex h-40 justify-evenly rounded-8 px-20"> | ||
{countList.map((count) => ( | ||
<CountItem | ||
key={count} | ||
onClick={() => setCountState(count)} | ||
isSelected={count === countState} | ||
count={count} | ||
/> | ||
))} | ||
</div> | ||
<div className="relative h-520 grow bg-black"> | ||
<Image src="/images/sample.png" fill alt="image" /> | ||
</div> | ||
<BottomFixedButton text="포즈 pick!" className="bg-main-violet text-white" /> | ||
</section> | ||
); | ||
} | ||
|
||
interface CountItemProps { | ||
isSelected: boolean; | ||
count: string; | ||
onClick: () => void; | ||
} | ||
|
||
function CountItem({ isSelected, count, onClick }: CountItemProps) { | ||
return ( | ||
<div | ||
className={`flex grow cursor-pointer items-center justify-center first:rounded-l-8 last:rounded-r-8 ${ | ||
isSelected | ||
? 'border-1 border-main-violet bg-main-violet-bright' | ||
: 'border-1 border-default bg-sub-white' | ||
}`} | ||
onClick={onClick} | ||
> | ||
<h6 className={isSelected ? 'text-main-violet-dark' : ''}>{count}</h6> | ||
</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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import PickSection from './components/PickSection'; | ||
|
||
export default function Pick() { | ||
return <>포즈픽s</>; | ||
return ( | ||
<> | ||
<PickSection /> | ||
</> | ||
); | ||
} |
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 |
---|---|---|
|
@@ -14,6 +14,10 @@ | |
display: none; | ||
} | ||
|
||
html { | ||
font-size: 4vw; | ||
} | ||
|
||
@media (min-width: 420px) { | ||
html { | ||
font-size: 16px; | ||
|
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,9 @@ | ||
import type { StrictPropsWithChildren } from '@/types'; | ||
|
||
export default function BottomFixedDiv({ children }: StrictPropsWithChildren) { | ||
return ( | ||
<div className="fixed inset-x-0 bottom-0 mx-auto max-w-440"> | ||
<div className="px-20 pb-20">{children}</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import BottomFixedDiv from '../BottomFixedDiv'; | ||
import Button, { type ButtonProps } from './Button'; | ||
|
||
export default function BottomFixedButton({ ...props }: ButtonProps) { | ||
return ( | ||
<BottomFixedDiv> | ||
<Button {...props} /> | ||
</BottomFixedDiv> | ||
); | ||
} |
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,20 @@ | ||
import type { ButtonHTMLAttributes, HTMLAttributes, PropsWithChildren } from 'react'; | ||
|
||
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { | ||
text: string; | ||
type?: 'button' | 'submit'; | ||
className?: string; | ||
props?: PropsWithChildren<HTMLAttributes<HTMLButtonElement>>; | ||
} | ||
|
||
export default function Button({ text, type = 'button', className, ...props }: ButtonProps) { | ||
return ( | ||
<button | ||
className={`flex h-60 w-full items-center justify-center rounded-xl py-14 text-center text-16 ${className}`} | ||
type={type} | ||
{...props} | ||
> | ||
<h5>{text}</h5> | ||
</button> | ||
); | ||
} |
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,2 @@ | ||
export { default as Button } from './Button'; | ||
export { default as BottomFixedButton } from './BottomFixedButton'; |
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,32 +1,32 @@ | ||
import { COLOR } from "../../src/constants/color"; | ||
|
||
export const colors = { | ||
// bg | ||
"white": COLOR.white, | ||
"sub-white": COLOR.gray[50], | ||
"divider": COLOR.gray[100], | ||
// bg | ||
white: COLOR.white, | ||
'sub-white': COLOR.gray[50], | ||
divider: COLOR.gray[100], | ||
|
||
// border | ||
"default": COLOR.gray[300], | ||
"active": COLOR.gray[900], | ||
"disabled": COLOR.gray[100], | ||
// border | ||
default: COLOR.gray[300], | ||
active: COLOR.gray[900], | ||
disabled: COLOR.gray[100], | ||
|
||
// brand colors | ||
"main-violet-light": COLOR.violet[300], | ||
"main-violet": COLOR.violet[500], | ||
"main-violet-dark": COLOR.violet[700], | ||
// brand colors | ||
'main-violet-bright': COLOR.violet[100], | ||
'main-violet-light': COLOR.violet[300], | ||
'main-violet': COLOR.violet[600], | ||
'main-violet-dark': COLOR.violet[700], | ||
|
||
// text | ||
"cto": COLOR.black, | ||
"brand": COLOR.violet[500], | ||
"primary":COLOR.gray[900], | ||
"secondary": COLOR.gray[700], | ||
"tertiary": COLOR.gray[500], | ||
"caption": COLOR.gray[400], | ||
|
||
// icon | ||
"icon-default": COLOR.gray[800], | ||
"icon-hover": COLOR.gray[600], | ||
"icon-disabled": COLOR.gray[500], | ||
// text | ||
cto: COLOR.black, | ||
brand: COLOR.violet[500], | ||
primary: COLOR.gray[900], | ||
secondary: COLOR.gray[700], | ||
tertiary: COLOR.gray[500], | ||
caption: COLOR.gray[400], | ||
|
||
} as const | ||
// icon | ||
'icon-default': COLOR.gray[800], | ||
'icon-hover': COLOR.gray[600], | ||
'icon-disabled': COLOR.gray[500], | ||
} as const; |
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