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

Avatar 컴포넌트 구현 #21

Merged
merged 15 commits into from
Oct 31, 2023
Merged

Avatar 컴포넌트 구현 #21

merged 15 commits into from
Oct 31, 2023

Conversation

dudwns
Copy link
Contributor

@dudwns dudwns commented Oct 30, 2023

📑 이슈 번호

#11

🚧 구현 내용

  • Avatar 컴포넌트 구현
  • AvatarGroup 컴포넌트 구현
스크린샷 2023-10-30 오후 7 43 47 스크린샷 2023-10-30 오후 7 44 20

🚨 특이 사항

Avatar props

interface AvatarProps {
  src: string // 이미지 url
  width: number // width 값
  height: number // height 값
  alt: string // alt 문구
  style?: CSSProperties // 그 외 style
}

AvatarGroup props

interface AvatarGroupProps {
  children: React.ReactNode // 내부 아바타 배열
  size?: number // 아바타 간격 (지정 안해도 됨, default: 60)
  limit?: number // 보여주는 아바타의 최대 수 (default: 3)
}

사용 예시 코드

<Avatar
    src={'/duck.jpg'}
    width={40}
    height={40}
    alt="프로필"
/>

<AvatarGroup>
    {avatars.map((avatar) => (
        <Avatar
            key={avatar.id}
            src={'/duck.jpg'}
            width={20}
            height={20}
            alt="프로필"
        />
    ))}
</AvatarGroup>

@dudwns dudwns added the ✨ Feature 기능 개발 label Oct 30, 2023
@dudwns dudwns added this to the 1차 스프린트 milestone Oct 30, 2023
@dudwns dudwns self-assigned this Oct 30, 2023
@dudwns dudwns linked an issue Oct 30, 2023 that may be closed by this pull request
1 task
Copy link
Contributor

@bomi8489 bomi8489 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!!

Copy link
Member

@eeseung eeseung left a comment

Choose a reason for hiding this comment

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

이미지 귀엽네요🐤 LGTM 입니다!

@dudwns dudwns merged commit 9a716d3 into develop Oct 31, 2023
1 check passed
@dudwns dudwns deleted the feature/#11/component-avatar branch October 31, 2023 05:13
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.

Avatar 컴포넌트 구현
3 participants