-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
로그인 페이지/회원가입 페이지 #14
base: master
Are you sure you want to change the base?
로그인 페이지/회원가입 페이지 #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier와 eslint가 설치여부와 에디터에서 실행중인지 확인해주세요! prettier로 포맷팅이 되지 않아 코드 읽기가 어렵고 eslint 오류가 몇개 보이는데 무시하시면 안돼요ㅠㅠ
다음부터는 fork한 리파지토리에서도 새로운 branch를 파셔서 작업 부탁드립니다!
UI는 전체적으로 괜찮아보여요🙂
다만 다른 요구사항이었던 비밀번호가 일치하는지 확인하는 로직이 빠져있고, 카카오 로그인 부분도 빠져있네요. 댓글 확인해주시고 다른 요구사항도 진행해주세요~!
@@ -0,0 +1,75 @@ | |||
import { Input,Typography, Button, DatePicker } from '@dodam/components'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
login 페이지에서는 DatePicker를 사용하고 있지 않습니다!
return ( | ||
<div> | ||
<div className="section"> | ||
<div class="title"><Typography class="title" variant="Heading">로그인</Typography></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
className을 class로 실수하신것같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typography varaint는 아래 종류만 가능합니다..!
const variant?: 'p' | 'h6' | 'h5' | 'h4' | 'h3' | 'h2' | 'h1' | 'span';
<Input type="text" placeholder="아이디를 입력하세요" /> | ||
<Input type="text" placeholder="비밀번호를 입력하세요" /> | ||
<Button fullWidth >로그인</Button> | ||
<div className="sub"><Typography><p><span>아이디/비밀번호 찾기 </span><span>|</span><span> 회원가입</span></p></Typography></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
span태그를 사용해야 될 경우에는 variant 에 span을 아래와 같이 전달할 수 있어요.
<Typography variant="span" />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<style jsx global> | ||
{` | ||
p{ | ||
text-align: center; | ||
font-size:12px; | ||
color:#505050; | ||
margin-bottom:70px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
global 한 스타일을 모든 p 태그에 적용하게 되면 다른 웹 페이지에서 사용되는 p 태그에도 영향을 줍니다...😭 scoped한 스타일을 적용할 수 있게 global을 삭제 해주시거나 class selector을 사용해주세요
p{ | ||
text-align: center; | ||
font-size:12px; | ||
color:#505050; | ||
margin-bottom:70px; | ||
} | ||
.sub{ | ||
text-align:center; | ||
justify-content:center; | ||
} | ||
.section{ | ||
margin:34px; | ||
} | ||
.title{ | ||
font-size:24px; | ||
font-weight: bold; | ||
justify-content:center; | ||
text-align:center; | ||
margin-top:60px ; | ||
margin-bottom: 35px; | ||
|
||
} | ||
.label1{ | ||
font-size:12px; | ||
color:#CDCDCD; | ||
} | ||
Button{ | ||
margin-top:36px; | ||
margin-bottom:10px; | ||
} | ||
.kakao{ | ||
margin-top:19px; | ||
color:#505050; | ||
} | ||
.hr-sect { | ||
display: flex; | ||
flex-basis: 100%; | ||
align-items: center; | ||
color: #BBBBBB; | ||
font-size: 12px; | ||
|
||
} | ||
.hr-sect::before, | ||
.hr-sect::after { | ||
content: ""; | ||
flex-grow: 1; | ||
background: #BBBBBB; | ||
height: 1px; | ||
font-size: 0px; | ||
line-height: 0px; | ||
margin: 0px 8px; | ||
} | ||
`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모든 margin과 padding은 8px배수로 해주세요. 이유는 링크를 참고해주세요!!
<Input label="비밀번호" type="text"/> | ||
<Input label="이름" type="text"/> | ||
<Typography className="label1">생년월일</Typography> | ||
<DatePicker selected={new Date()} onChange={(date) => console.log(date)} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
선택된 Date은 useState
을 사용해서 컴포넌트 데이터로 가지고 있는게 좋아보여요
<style jsx global> | ||
{` | ||
|
||
.section{ | ||
margin:34px; | ||
} | ||
.title{ | ||
font-size:24px; | ||
font-weight: bold; | ||
justify-content:center; | ||
text-align:center; | ||
margin-top:60px ; | ||
margin-bottom: 35px; | ||
|
||
} | ||
.label1{ | ||
font-size:12px; | ||
color:#CDCDCD; | ||
} | ||
`} | ||
</style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기서도 global한 스타일을 적용하면 모든 .title
, .label1
클래스가 모든 웹페이지에 반영돼요. section 클래스 안에서만 적용될 수 있게 .section .title
, .section .label1
이런식으로 클래스 selector를 수정하는것도 하나의 방법일것같아요
<Button fullWidth variant="secondary">가입하기</Button> | ||
|
||
|
||
</div>s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s 지우시는걸 깜빡하신것 같아요ㅋㅋㅋ
<div> | ||
<div className="section"> | ||
<div class="title"><Typography class="title" variant="Heading">로그인</Typography></div> | ||
<Input type="text" placeholder="아이디를 입력하세요" /> | ||
<Input type="text" placeholder="비밀번호를 입력하세요" /> | ||
<Button fullWidth >로그인</Button> | ||
<div className="sub"><Typography><p><span>아이디/비밀번호 찾기 </span><span>|</span><span> 회원가입</span></p></Typography></div> | ||
<div class="hr-sect">또는</div> | ||
|
||
<Button fullWidth className="kakao">Kakao로 계속</Button> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
form을 제출하는 페이지기 때문에 <form>
태그로 감싸주고 submit 이벤트를 핸들해주어야 합니다. 아래 예시와 같이 작성을 해주셔야 엔터나 버튼을 클릭하면 submit 이벤트가 실행돼요!
<form onSubmit={ handleSubmit }>
...
</form>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
form 예제
class 컴포넌트로 되어있는 예제입니다. 이 예제를 참고하면서 함수형 컴포넌트로 옮겨주세요
<div className="section"> | ||
<div class="title"><Typography class="title" variant="Heading">회원가입</Typography></div> | ||
<Input label="아이디" type="text"/> | ||
<Input label="비밀번호" type="text"/> | ||
<Input label="비밀번호" type="text"/> | ||
<Input label="이름" type="text"/> | ||
<Typography className="label1">생년월일</Typography> | ||
<DatePicker selected={new Date()} onChange={(date) => console.log(date)} /> | ||
<Input label="휴대폰 번호(-없이 입력하세요)" type="text"/> | ||
|
||
<Button fullWidth variant="secondary">가입하기</Button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 페이지에서도 form을 제출하기 때문에 form
태그로 감싸주세요!
요약
-dodam/pages/login.js 생성
-dodam/pages/register.js 생성
설명