feat(button): Redesign Button component based on 5th generation design system#263
feat(button): Redesign Button component based on 5th generation design system#263osohyun0224 wants to merge 6 commits into
Conversation
🦋 Changeset detectedLatest commit: 1f95a0a The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
Yeom-JinHo
left a comment
There was a problem hiding this comment.
Radix Slot만 확인해주시겠어요~?
나머지는 좋습니다 : )
| base: { | ||
| vars: { | ||
| [buttonOrange]: '#FF7C27', | ||
| [buttonGradient]: 'linear-gradient(225deg, #FF4500 0%, #FFB24D 100%)', |
There was a problem hiding this comment.
여기 추후 토큰이 그라디언트 자체로 끼워지는건가요?
color.gradient?
There was a problem hiding this comment.
@Yeom-JinHo 넵넵 color.5th.gradient 처럼 5기 전용 그라디언트 토큰으로 들어가게 될 것 같습니다 hover 상태를 그라디언트 색상으로 진행하고 싶어하시더라고요!!
| <Comp ref={ref} type={type} className={className} disabled={disabled} {...props}> | ||
| {leftIcon && <span className={styles.iconWrapper}>{leftIcon}</span>} | ||
| {children} | ||
| {rightIcon && <span className={styles.iconWrapper}>{rightIcon}</span>} | ||
| </Comp> |
There was a problem hiding this comment.
There was a problem hiding this comment.
@Yeom-JinHo 진호님 감사합니다!! 버튼 컴포넌트가 이제 leftIcon, rightIcon이 있는 Button은 다중 자식 구조라서 Slottable을 적용하여 수정해서 재 반영해두겠습니다!! 리뷰 감사합니다 ~!
| [buttonOrange]: '#FF7C27', | ||
| [buttonGradient]: 'linear-gradient(225deg, #FF4500 0%, #FFB24D 100%)', | ||
| [buttonRed]: '#FE4E07', | ||
| }, |
There was a problem hiding this comment.
이것도 마찬가지로,
#258
에서 이미 semantic token 을 구축했으니,
여기만 독자적인 스타일을 쓰는 게 아니라,
시맨틱 토큰이 활용한 지 검토해주세요!
| }, | ||
| [ButtonSize.md]: { | ||
| height: '40px', | ||
| padding: '0 12px', |
There was a problem hiding this comment.
이것도 마찬가지로.
vars.spacing.component.md 처럼
시맨틱 토큰에 해당 내용이 있으니 확인해서 사용해주시면 좋을 것 같습니다.
| pointerEvents: 'none', | ||
| export const buttonOrange = createVar(); | ||
| export const buttonGradient = createVar(); | ||
| export const buttonRed = createVar(); |
There was a problem hiding this comment.
There was a problem hiding this comment.
지훈님 말씀처럼 가능한 토큰 시스템 이용해주시면 v2 token으로 마이그레이션할 때도 수월할 것 같아요!
| cursor: 'not-allowed', | ||
| pointerEvents: 'none', | ||
| border: 'none', | ||
| background: color.gray500, |
There was a problem hiding this comment.
backgroundColor: color.gray500,
가 이미 있어서 스타일이 중복되는 것 같습니다
| fontFamily: vars.typography.fontFamily, | ||
| ':focus-visible': { | ||
| outline: `2px solid ${vars.color.border.focus}`, | ||
| outline: `2px solid ${buttonOrange}`, |
There was a problem hiding this comment.
포커스링은 브랜드 컬러보다는,
blue 계열이 일반적으로 더 적합한 것 같습니다 (WCAG 구분 가능성)
@3o14 님 크로스체크 부탁드립니다
| primary: '#FF7C27', | ||
| secondary: '#FE4E07', | ||
| background: '#000000', | ||
| text: '#000000', |
There was a problem hiding this comment.
이거...
background 와 text 색이 같은데 이러면 색상이 잘 보일까요?

Fixed #214 #215 #216
Changes
피그마 파일 바로 가기 5세대 디자인 시스템에 맞춰 Button 컴포넌트를 전면 개편했습니다.
타입 시스템 변경
sm | lg→sm | md | lg | xl(4단계로 확장)filled | outline | ghost→fill | outline | ghost(filled→fill네이밍 변경)leftIcon,rightIconprops 추가 (ReactNode 타입, 상위 컴포넌트에서 아이콘 전달)사이즈별 스펙
smmdlgxlVariant 스타일
fill#FF7C27(5th orange)#000outline#FF7C27#FF7C27ghost#FF7C27Interaction 상태 (fill 기준)
#FF7C27linear-gradient(225deg, #FF4500 0%, #FFB24D 100%)#FE4E07#71717A(텍스트:#52525B)#FE4E07색상 시스템 변경
vars.color.primary(테마 의존) →createVar()로 버튼 전용 색상 변수 선언buttonOrange (#FF7C27),buttonGradient,buttonRed (#FE4E07)— 5세대 디자인 토큰에 맞춘 고정 색상color.gray500,color.gray600) 직접 참조토큰 변경
packages/tokens/src/colors/colors.ts에theme5th추가 (primary:#FF7C27, secondary:#FE4E07, gradient)변경된 파일
packages/button/src/Button.tsxpackages/button/src/Button.css.tspackages/button/src/Button.stories.tsxpackages/button/src/Button.test.tsxpackages/tokens/src/colors/colors.tstheme5th및themeColor['5th']추가Visuals
스토리북에서 다음 스토리를 확인할 수 있습니다:
Basic— 기본 fill/lg 버튼Variants— fill, outline, ghost 비교Sizes— sm, md, lg, xl 비교Disabled— 각 variant별 disabled 상태WithLeftIcon— 검색 아이콘 + 텍스트WithRightIcon— 텍스트 + 화살표 아이콘WithBothIcons— 다운로드 아이콘 + 텍스트 + 셰브론 아이콘AllVariantsAndSizes— 전체 variant x size 매트릭스Checklist
Additional Discussion Points
ButtonVariant.filled→ButtonVariant.fill로 변경되었습니다. 기존에variant="filled"를 사용하는 곳이 있다면variant="fill"로 수정이 필요합니다.ButtonSize에서 기본값이lg로 유지되지만, 기존sm | lg에서sm | md | lg | xl로 확장되었습니다.vars.color.primary)에서 분리되어createVar()로 독립적으로 관리됩니다. 향후 테마 연동이 필요한 경우buttonOrange등의 CSS 변수를 외부에서 override할 수 있습니다.