-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feat: default chip 확장 및 추가 chip #48
Merged
nakyoung98
merged 14 commits into
develop
from
feature/issue-39--Feat-DefaultChip-확장-및-추가-Chi
Mar 12, 2024
The head ref may contain hidden characters: "feature/issue-39--Feat-DefaultChip-\uD655\uC7A5-\uBC0F-\uCD94\uAC00-Chi"
Merged
Feat: default chip 확장 및 추가 chip #48
nakyoung98
merged 14 commits into
develop
from
feature/issue-39--Feat-DefaultChip-확장-및-추가-Chi
Mar 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
아이콘이 있을 경우 onClick이벤트가 Icon 클릭 시로 이동
올바른 PR 형식올바른 PR 형식입니다. |
kimbobby
approved these changes
Mar 12, 2024
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.
👍
Yoon-kyungLee
approved these changes
Mar 12, 2024
JIS0098
approved these changes
Mar 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📌요구사항
📌작업 진행 상황 (에러, 막혔던 부분, 그외 궁금한것 등등)
DefaultChip 컴포넌트 사용 가이드
DefaultChip
은 다양한 상황에서 사용 가능한 범용 UI 컴포넌트입니다. 본 가이드는 개발자가DefaultChip
을 효과적으로 활용할 수 있도록 돕습니다.컴포넌트 구조
DefaultChip
은 다음 props를 지원합니다label
(필수): 칩의 주요 텍스트 내용입니다.imgUrl
(옵셔널): 칩에 표시할 이미지 URL입니다.icon
(옵셔널): 칩에 포함할 아이콘 정보로,src
와alt
텍스트를 가진 객체 형태입니다.isSelected
(옵셔널): 칩의 선택 상태를 나타내며, 시각적으로 구분됩니다.onClick
(옵셔널): 칩 클릭 시 실행될 콜백 함수입니다.onIconClick
(옵셔널): 아이콘 클릭 시 실행될 콜백 함수로, 아이콘이 존재할 때만 유효합니다.isVertical
(옵셔널): 칩 내용의 수직 배치 여부를 결정합니다.className
(옵셔널): 요건 쓰실일이 없을겁니다. 추가 컴포넌트 만들 때styled(DefaultChip)
를 쓰기 위해서 넣은거에요. styled-component가 자동으로 사용하는 친구입니다.사용 예시
스타일링
DefaultChip
를 덮어 다른 Chip을 만들기 위해서는 아래와같은 코드를 사용하시면 됩니다접근성 고려사항
user-select: none;
속성이 적용되어 텍스트 선택이 불가능합니다. 사용자가 실수로 칩 텍스트를 드래그하여 선택하는 것을 방지하기 위함인데, 접근성에 이슈가 있을까 고민이 됩니다사용 시 유의사항
onClick
은 실행되지 않고 아이콘 클릭 시에만onIconClick
이 실행됩니다.isVertical
옵션을 통해 내용 배치를 쉽게 조정할 수 있어, 다양한 레이아웃 요구사항에 대응 가능합니다. 다만 이 때, 아이콘이 우측 상단에 자동 배치됩니다 :)isSelected
를 통해 선택 상태를 시각적으로 구분할 수 있어, 사용자의 상태 인지가 용이해집니다.📌스크린샷 / 테스트결과 (선택)
co-KKIRI.-.Chrome.2024-03-12.11-53-03.mp4
📌이슈 번호
Closes: #39