Skip to content
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

Tag #2463

Open
Tracked by #2148
sungik-choi opened this issue Oct 25, 2024 · 1 comment
Open
Tracked by #2148

Tag #2463

sungik-choi opened this issue Oct 25, 2024 · 1 comment
Assignees
Labels
feat:component Issue or PR related to a new component

Comments

@sungik-choi
Copy link
Contributor

sungik-choi commented Oct 25, 2024

Summary

V2 디자인 시스템의 Tag 컴포넌트를 구현합니다.

Goals & Requirements

  • V2 디자인 토큰의 functional 컬러로 색상 변경이 가능해야 합니다.
  • 텍스트 길이가 길어지면 ellipsis 되어야 합니다.

Design Details

  • container 너비 기준으로 텍스트를 ellipsis 처리 합니다.

Use Cases

  • 사용 목적이 정보 필터링 또는 검색이라면 태그를, 중요 알림 및 상태 표시라면 Badge 컴포넌트를 사용합니다.
interface TagProps {
  size?: 's' | 'm' | 'l'  // default: 's'
  color?:  'grey' | 'blue' | 'cobalt' | 'teal' | 'green' | 'olive' | 'pink' | 'navy' | 'yellow' | 'orange' | 'red' | 'purple' // default: 'grey'
  showCloseButton?: true | false // default: false
  showAvatar?: true | false // default: false
}

Accessibility

  • close 아이콘의 role을 'button' 으로 지정합니다.

Test Plan

  • close 아이콘의 handler, Tag 컴포넌트의 click handler 가 잘 동작하는지
  • close 아이콘을 클릭했을 때 Tag 컴포넌트의 click handler 가 호출되지 않는지
  • overflow 되었을 때 ellipsis 처리가 잘 되는지 (visual test)

Alternatives

  • 생략

References

(internal)

Copy link

channeltalk bot commented Oct 25, 2024

@sungik-choi sungik-choi self-assigned this Oct 25, 2024
@sungik-choi sungik-choi added the feat:component Issue or PR related to a new component label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat:component Issue or PR related to a new component
Projects
No open projects
Status: 📌 Backlog
Development

No branches or pull requests

2 participants