Skip to content

Conversation

@junghwaYang
Copy link
Contributor

@junghwaYang junghwaYang commented Dec 17, 2024

이슈 번호

close #48

변경 사항 요약

  • 하트 아이콘의 색상 변경을 위해 컴포넌트로 만들었습니다
  • 하트 카운트 컴포넌트는 onClick prop가 있을때만 카운트 됨과 동시에 컬러가 변경 됩니다.
  • onClick props가 없을 경우에는 클릭 이벤트가 동작하지않고 컬러도 바뀌지않는 정적 컴포넌트로 사용할 수 있습니다.
props type dec
count number 하트 카운팅 초기값
onClick function 부모로부터 전달받는 핸들러
textSize string 텍스트 사이즈
iconSize string 아이콘 사이즈
className string 사용자 설정 class

테스트 결과

  • 평상시
image
  • 클릭 시
image

- fill props를 통해 컬러를 변경할 수 있게 설정
- 호출 시 onClick이 있으면 컬러 변경
- 없을 경우 클릭 없이 정적 요소로 사용
@junghwaYang junghwaYang added ✨ 신규 기능 신규 기능 작업 관련 태그 📁 컴포넌트 컴포넌트 개발 관련 작업 labels Dec 17, 2024
@junghwaYang junghwaYang self-assigned this Dec 17, 2024
Copy link
Collaborator

@haksoo0918 haksoo0918 left a comment

Choose a reason for hiding this comment

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

간결하게 잘 만들어 주셨습니다. 👍
div 만 버튼으로 바꿔 주시면 될 것 같습니다.

- onClick이 있을때는 button 태그와 cursor-pointer
- onClick이 없을때는 div태그
Copy link
Collaborator

@crazyupinc-design crazyupinc-design left a comment

Choose a reason for hiding this comment

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

수고하셨습니다
승인드립니다

@junghwaYang
Copy link
Contributor Author

간결하게 잘 만들어 주셨습니다. 👍 div 만 버튼으로 바꿔 주시면 될 것 같습니다.

확인되시면 승인 부탁드립니다!

@haksoo0918 haksoo0918 self-requested a review December 18, 2024 02:34
Copy link
Collaborator

@haksoo0918 haksoo0918 left a comment

Choose a reason for hiding this comment

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

제가 확인이 늦었네요. 지송합니다.
github 이용이 서툴러서 뭔가 잘못 눌른거 같기도 하고..;;

@junghwaYang junghwaYang merged commit fdfce90 into develop Dec 18, 2024
1 check passed
@junghwaYang junghwaYang deleted the feature/#48_Heart-컴포넌트 branch December 18, 2024 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ 신규 기능 신규 기능 작업 관련 태그 📁 컴포넌트 컴포넌트 개발 관련 작업

Projects

Status: 완료

Development

Successfully merging this pull request may close these issues.

Heart 컴포넌트

4 participants