-
Notifications
You must be signed in to change notification settings - Fork 2
[#8] 좋아요 버튼 컴포넌트 제작 #52
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
junye0l
left a comment
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.
고생하셨습니다!
코멘트 확인 부탁드립니다. 🙇🏻
| import IconButton from "./icon-button"; | ||
| import ArrowButton from "./arrow-button"; | ||
| import ICON_MAP from "../icon/icon-map"; | ||
| import LikeButton from "./like-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.
스토리북 파일에 추가 되었다면, chromatic 라벨을 추가하는게 좋을 것 같아요!
wlrnjs
left a comment
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.
수고하셨습니다. 코멘트 확인해주세요!
| */ | ||
| const LikeButton = ({ isLike, count, ...props }: LikeButtonProps) => { | ||
| return ( | ||
| <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.
div 래핑은 불필요해서 제거해도 괜찮을듯 합니다!
| "cursor-pointer rounded-lg py-1 pl-2 pr-3", | ||
| "mobile:h-8 mobile:gap-[2px]", | ||
| "tablet:h-8 tablet:gap-[2px]", |
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.
현재 mobile:h-8 mobile:gap-[2px], tablet:h-8 tablet:gap-[2px]는 동일한 값이라
base 스타일로 h-8 gap-[2px]만 선언해도 동일하게 동작합니다.
PC 구간만 오버라이드하면 코드가 더 간결해질 것 같아요
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.
테스트 해봤는데 Button 컴포넌트 내부에 있는 스타일 요소 때문에 제가 말씀드린 방식으로는 적용되지 않는 것 같네요.
이런 경우에는 휘태님께서 작성해주신 코드를 사용하는게 올바른것 같습니다.
원래는 저 방식이 맞는데 왜 안되나 했네요.. 확인 감사합니다!

📄 PR 내용 요약
좋아요 버튼 컴포넌트입니다.
✅ 작업 내용 상세
부모 컴포넌트에서
isLikeprop을 전달받아 버튼의 스타일을 변경하도록 제작했습니다.PC 반응형 스타일에서
gap이6px인데 가로로 너무 길어보여서4px로 줄여보았습니다.좋아요 개수 표기 문구를 수정했습니다 십만 자리 수 까지는
~만의 형태로 표기됩니다.📸 스크린샷 (선택사항)
💬 참고 사항