-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Refactor/#362] 메인 및 예매 조회 UI 변경사항 반영 #371
Conversation
xsmall 버튼만 유동적으로 사용하는 것으로 알고 있어 사이즈 커스텀 시 폰트는 xsmall과 동일하게 지정해두었습니다
PR 작성하느라 고생 많았어요!! 라벨 잘 지정되었는지 확인 한 번 해 주기 🫶 |
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.
수고했습니당! 코멘트에 제안사항 적어두었는데 한번 확인해주세용
} | ||
} else if (typeof $size === "object") { | ||
return css` | ||
width: ${$size.width}; | ||
height: ${$size.height}; | ||
${({ theme }) => theme.fonts["caption1-semi"]}; | ||
`; |
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.
p5) 뜨거운 감자였는데 좋은 선택인것 같습니다!
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.
🥔 ..........
width: 32.7rem; | ||
height: 5.6rem; |
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.
p3) 위에서 width랑 height를 따로 정의해뒀는데 이렇게 사용하는 것은 별로 좋은 선택은 아닌 것 같습니다..!
아래에 코드 작성해둘테니 변경하는 것도 좋을 것 같습니다.
height: 4.6rem; | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; |
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.
p3) 보니까 fonts가 중복되는 case들이 많고, theme을 계속 가져와서 사용하는 것이 중복되는 것 같습니다.
얘도 마찬가지로 아래에 코드 작성할테니 맘에 드시면 변경해주세요!
${({ $size }) => { | ||
switch ($size) { | ||
case "xlarge": | ||
return css` | ||
${({ theme }) => theme.fonts["body1-normal-semi"]}; | ||
`; | ||
case "large": | ||
return css` | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "medium": | ||
return css` | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "small": | ||
return css` | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "xsmall": | ||
return css` | ||
${({ theme }) => theme.fonts["caption1-semi"]}; | ||
`; | ||
if (typeof $size === "string") { | ||
switch ($size) { | ||
case "xlarge": | ||
return css` | ||
width: 32.7rem; | ||
height: 5.6rem; | ||
${({ theme }) => theme.fonts["body1-normal-semi"]}; | ||
`; | ||
case "large": | ||
return css` | ||
width: 27.9rem; | ||
height: 4.6rem; | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "medium": | ||
return css` | ||
width: 15.8rem; | ||
height: 4.6rem; | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "small": | ||
return css` | ||
width: 13.6rem; | ||
height: 4.6rem; | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "xsmall": | ||
return css` | ||
width: 10.3rem; | ||
height: 3.6rem; | ||
${({ theme }) => theme.fonts["caption1-semi"]}; | ||
`; | ||
} |
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.
p3) 여기까지 작성된 if문을 아래 코드로 변경하는 것은 어떤가용??
계속 중복되는 폰트들도 많고, theme도 반복해서 가져오고, width를 직접 하나하나 작성하는 것이 비효율적인 것 같아서 어차피 js 문법을 사용할거면 font를 따로 변수로 만들어서 정의하고 한번에 return하는 것이 깔끔할 것 같습니다!!
${({ $size, theme }) => {
if (typeof $size === "string") {
let font;
switch ($size) {
case "xlarge":
font = theme.fonts["body1-normal-semi"];
break;
case "xsmall":
font = theme.fonts["caption1-semi"];
break;
default:
font = theme.fonts["body2-normal-semi"];
}
return css`
${font};
width: ${width[$size]};
height: ${height[$size]};
`;
}
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.
최고다 김채현
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.
헉 그렇네요........!! 반영하겠습니다 레전드띠예
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.
화긴했습니다~
채현이 리뷰 최고네용 🙌
${({ $size }) => { | ||
switch ($size) { | ||
case "xlarge": | ||
return css` | ||
${({ theme }) => theme.fonts["body1-normal-semi"]}; | ||
`; | ||
case "large": | ||
return css` | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "medium": | ||
return css` | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "small": | ||
return css` | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "xsmall": | ||
return css` | ||
${({ theme }) => theme.fonts["caption1-semi"]}; | ||
`; | ||
if (typeof $size === "string") { | ||
switch ($size) { | ||
case "xlarge": | ||
return css` | ||
width: 32.7rem; | ||
height: 5.6rem; | ||
${({ theme }) => theme.fonts["body1-normal-semi"]}; | ||
`; | ||
case "large": | ||
return css` | ||
width: 27.9rem; | ||
height: 4.6rem; | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "medium": | ||
return css` | ||
width: 15.8rem; | ||
height: 4.6rem; | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "small": | ||
return css` | ||
width: 13.6rem; | ||
height: 4.6rem; | ||
${({ theme }) => theme.fonts["body2-normal-semi"]}; | ||
`; | ||
case "xsmall": | ||
return css` | ||
width: 10.3rem; | ||
height: 3.6rem; | ||
${({ theme }) => theme.fonts["caption1-semi"]}; | ||
`; | ||
} |
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.
최고다 김채현
Quality Gate passedIssues Measures |
📌 관련 이슈번호
🎟️ PR 유형
어떤 변경 사항이 있나요?
✅ Key Changes
📢 To Reviewers
<Button variant="line" size={{ width: "10.8rem", height: "3.6rem" }} >
처럼 size에 width와 height를 주면 xsmall 폰트에 맞춰 사이즈 변경할 수 있도록 수정하였습니다!📸 스크린샷