-
Notifications
You must be signed in to change notification settings - Fork 6
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 #62 from Kernel360/page-signup
페이지 UI: 회원가입
- Loading branch information
Showing
9 changed files
with
103 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function Signuplayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<div style={{ padding: '0 24px' }}>{children}</div> | ||
); | ||
} | ||
|
||
export default Signuplayout; |
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,5 @@ | ||
.ageGroupContainer { | ||
display: grid; | ||
grid-template-columns: repeat(3, 1fr); | ||
gap: 18px; | ||
} |
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,60 @@ | ||
/* eslint-disable @typescript-eslint/no-misused-promises */ | ||
|
||
'use client'; | ||
|
||
import { useForm } from 'react-hook-form'; | ||
|
||
import classNames from 'classnames/bind'; | ||
|
||
import Button from '@components/shared/button/Button'; | ||
import Flex from '@components/shared/flex/Flex'; | ||
import Header from '@components/shared/header/Header'; | ||
import Radio from '@components/shared/radio/Radio'; | ||
import Spacing from '@components/shared/spacing/Spacing'; | ||
import Text from '@components/shared/text/Text'; | ||
import TextField from '@components/shared/text-field/TextField'; | ||
import Title from '@components/shared/title/Title'; | ||
|
||
import styles from './page.module.scss'; | ||
|
||
const cx = classNames.bind(styles); | ||
|
||
function SignupPage() { | ||
const { register, handleSubmit } = useForm(); | ||
// eslint-disable-next-line @typescript-eslint/require-await | ||
const onSubmit = async () => { | ||
// console.log(data); | ||
}; | ||
return ( | ||
<form onSubmit={handleSubmit(onSubmit)}> | ||
<Header displayLogo={false} /> | ||
<Spacing size={20} /> | ||
<Title title="회원가입" /> | ||
<TextField label="아이디" required placeholder="아이디" {...register('id')} /> | ||
<TextField label="비밀번호" required placeholder="비밀번호" {...register('password')} /> | ||
<TextField label="비밀번호 확인" required placeholder="비밀번호 확인" {...register('confirmedPassword')} /> | ||
<TextField label="이메일" required placeholder="이메일" {...register('email')} /> | ||
<Text typography="t6"> 성별</Text> | ||
<Spacing size={20} /> | ||
<Flex justify="space-between" gap={10}> | ||
<Radio type="gender" label="남성" value="male" {...register('gender')} /> | ||
<Radio type="gender" label="여성" value="female" {...register('gender')} /> | ||
</Flex> | ||
<Spacing size={20} /> | ||
<Text typography="t6">연령층</Text> | ||
<Spacing size={20} /> | ||
<div className={cx('ageGroupContainer')}> | ||
<Radio type="ageGroup" label="20대 이상" value="20" {...register('age')} /> | ||
<Radio type="ageGroup" label="30대" value="30" {...register('age')} /> | ||
<Radio type="ageGroup" label="40대" value="40" {...register('age')} /> | ||
<Radio type="ageGroup" label="50대" value="50" {...register('age')} /> | ||
<Radio type="ageGroup" label="60대 이상" value="60" {...register('age')} /> | ||
</div> | ||
<Spacing size={50} /> | ||
<Button size="medium" full>약관 동의하러 가기</Button> | ||
<Spacing size={20} /> | ||
</form> | ||
); | ||
} | ||
|
||
export default SignupPage; |
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,9 +1,13 @@ | ||
import { forwardRef, InputHTMLAttributes } from 'react'; | ||
import './Input.module.scss'; | ||
|
||
import classNames from 'classnames/bind'; | ||
|
||
import styles from './Input.module.scss'; | ||
|
||
const cx = classNames.bind(styles); | ||
// eslint-disable-next-line prefer-arrow-callback | ||
const Input = forwardRef<HTMLInputElement, InputHTMLAttributes<HTMLInputElement>>((props, ref) => { | ||
return <input {...props} ref={ref} />; | ||
return <input className={cx('input')} {...props} ref={ref} />; | ||
}); | ||
|
||
export default Input; |
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,48 +1,48 @@ | ||
input[type="radio"] { | ||
.input[type="radio"] { | ||
display: none; | ||
} | ||
|
||
label { | ||
.label { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 100%; | ||
} | ||
|
||
label.gender { | ||
.label.gender { | ||
height: 48px; | ||
border-radius: 8px; | ||
} | ||
|
||
input[type="radio"] + label.gender { | ||
.input[type="radio"] + .label.gender { | ||
border: 1px solid var(--gray-100); | ||
background-color: var(--white); | ||
color: var(--gray-300); | ||
} | ||
|
||
input[type="radio"]:checked + label.gender { | ||
.input[type="radio"]:checked + .label.gender { | ||
background-color: var(--primary); | ||
color: var(--white); | ||
} | ||
|
||
label.ageGroup { | ||
.label.ageGroup { | ||
height: 47px; | ||
border-radius: 30px; | ||
} | ||
|
||
label.additionalInfo { | ||
.label.additionalInfo { | ||
height: 60px; | ||
border-radius: 10px; | ||
} | ||
|
||
input[type="radio"] + label.ageGroup, | ||
input[type="radio"] + label.additionalInfo { | ||
.input[type="radio"] + .label.ageGroup, | ||
.input[type="radio"] + .label.additionalInfo { | ||
background-color: var(--white-100); | ||
color: var(--gray-300); | ||
} | ||
|
||
input[type="radio"]:checked + label.ageGroup, | ||
input[type="radio"]:checked + label.additionalInfo { | ||
.input[type="radio"]:checked + .label.ageGroup, | ||
.input[type="radio"]:checked + .label.additionalInfo { | ||
background-color: var(--primary); | ||
color: var(--white-100); | ||
} |
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