Skip to content

[Feat] FavoriteButton 컴포넌트 제작#40

Merged
YeBeenChoi merged 22 commits into
mainfrom
39-feat/FavoriteButton-컴포넌트-제작
Jan 20, 2026

Hidden character warning

The head ref may contain hidden characters: "39-feat/FavoriteButton-\ucef4\ud3ec\ub10c\ud2b8-\uc81c\uc791"
Merged

[Feat] FavoriteButton 컴포넌트 제작#40
YeBeenChoi merged 22 commits into
mainfrom
39-feat/FavoriteButton-컴포넌트-제작

Conversation

@YeBeenChoi

@YeBeenChoi YeBeenChoi commented Jan 19, 2026

Copy link
Copy Markdown
Collaborator

✨ 주요 변경사항

  • FavoriteButton 컴포넌트 구현 및 토글/포커스 동작 추가
  • 하트 아이콘 추가 및 아이콘 export 정리
  • Playground에 FavoriteButton 예시 추가

📝 작업 상세 내용

  • 아이콘 스왑 방식으로 기본/활성 상태 구분

✅ 체크리스트

  • PR 본문에 Close #번호 추가
  • 불필요한 주석, 디버깅 코드 제거
  • 기능 테스트 및 정상 동작 확인
  • 커밋컨벤션 / 코드컨벤션 준수

📸 스크린샷 (선택)

FavoriteButtonDemo.mov

🔍 기타 참고사항


🔗 관련 이슈

@github-actions github-actions Bot added the ✨Feature 새로운 기능 label Jan 19, 2026
@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 포맷 필요
Test: 실패
Build: 실패

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 5MB

@KyeongJooni KyeongJooni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다! 코멘트 확인 부탁드립니다!! :)

Comment on lines +6 to +14
export const FavoriteButton = ({
defaultActive = false,
onToggle,
ariaLabel = '찜',
}: {
defaultActive?: boolean;
onToggle?: (isActive: boolean) => void;
ariaLabel?: string;
}) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

props 타입을 다른 컴포넌트에서 감쌀 때 재사용을 위해 interface로 별도로 분리해서 export 하는게 더 좋을 것 같다고 생각하는게 어떻게 생각하시나요...?!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 의견 감사합니다! 재사용을 고려해 props를 interface로 분리하고 export 했습니다 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variant 속성이 없는 경우 tva 의존성을 주입할 필요가 없다고 저는 개인적으로 생각해서 Styles.ts로 분리했을 것 같습니다! 제 개인적인 생각이니 참고는 해보시는 것도 좋을 것 같아요!

@YeBeenChoi YeBeenChoi Jan 20, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

의견 감사합니다! 피그마를 다시 살펴 보니 수리점 내역 화면에서도 테두리 색상이 반전된 FavoriteButton이 사용되고 있어서, default/inverse variant를 추가하면서 tv를 유지했습니다 또한 추후 카드 컴포넌트에 FavoriteButton이 추가될 경우 사이즈가 달라질 가능성도 있다고 생각해, 확장성을 고려하여 현재 구조를 유지했습니다! 필요하다면 styles로 분리하는 방향으로 수정해 보겠습니다 😀

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 포맷 필요
Test: 실패
Build: 실패

@github-actions

Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Test: 통과
Build: 성공
Build Size: 5MB

@KyeongJooni KyeongJooni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@YeBeenChoi
YeBeenChoi merged commit 1ba2827 into main Jan 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨Feature 새로운 기능

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] #39 - FavoriteButton 컴포넌트 제작

2 participants