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
[LDS-9] remake custom chip component and story #75
Conversation
오늘 회의에서 논의한 대로 전체 control에 Color BaseClass가 추가되면 Chip에서 decorators 부분 제거하겠습니다. |
control: { | ||
type: "select", | ||
}, | ||
options: [ |
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.
thumbnail을 한번 설정하면 뺄 수가 없으니 undefined도 있으면 좋겠습니당
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.
네 undefined도 추가했습니다.
하는 김에 thumbnail icon은 variant가 "outlined"일 때와 "filled"일 때 둘 다를 볼 수 있도록 예시 추가했습니다.
색이 figma와 다르니 상태 리뷰가 쉽지 않네요 ㅋㅋ |
fontStyle: "normal", | ||
fontWeight: 500, | ||
fontSize: "12px", | ||
lineHeight: "14.32px", |
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.
브라우저마다 조금씩은 다르지만 CSS에서 소수점 단위 픽셀은 반올림 처리가 되기 때문에 생략하는게 좋지않을까요?
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.
엇 그런데 피그마 inspect에서 나오는 css는 line-height: 16px; /* identical to box height, or 133% */
이네용
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.
엇... 그새 수정되었었나 보네요. 안 그래도 어차피 텍스트는 중앙에 놓이는데 lineHeight가 14px일 이유가 없네 의아했습니다.
꼼꼼히 봐주셔서 감사해요. 수정했습니다!
if (thumbnail && typeof thumbnail === "string") | ||
return <Avatar>{thumbnail.slice(0, 1).toLocaleUpperCase()}</Avatar>; | ||
if (thumbnail && typeof thumbnail === "string" && thumbnail.length === 0) | ||
return <Avatar></Avatar>; | ||
return undefined; |
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.
if (thumbnail && typeof thumbnail === "string") | |
return <Avatar>{thumbnail.slice(0, 1).toLocaleUpperCase()}</Avatar>; | |
if (thumbnail && typeof thumbnail === "string" && thumbnail.length === 0) | |
return <Avatar></Avatar>; | |
return undefined; | |
if (!thumbnail || typeof thumbnail !== "string") return; | |
if (thumbnail.length === 0) return <Avatar></Avatar>; | |
return <Avatar>{thumbnail.slice(0, 1).toLocaleUpperCase()}</Avatar>; |
이런식으로 if 문 최적화 할 수 있을 것 같습니다
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.
instance 아닌 이상 return 값은 어차피 undefined인 거 잊고 있었네요. 상세한 예시와 함께 최적화 방법 제안해주셔서 감사합니다!
반영했습니다!
유선 상 논의했던 onDelete 관련 문제는 Storybook 7으로 업그레이드를 진행하면 고쳐질 것으로 예상합니다. 참고 자료: storybookjs/storybook#17063 |
Description
core.hover
를 적용해두었으나 해당 기능이 완료되지 않은 상황이라 Figma와는 다르게 보일 것입니다.Review Request
Additional works