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

feat(ui): Skeleton 컴포넌트 구현 #178

Merged
merged 19 commits into from
Oct 27, 2024
Merged

feat(ui): Skeleton 컴포넌트 구현 #178

merged 19 commits into from
Oct 27, 2024

Conversation

Brokyeom
Copy link
Member

@Brokyeom Brokyeom commented Oct 20, 2024

변경사항

  • Skeleton 컴포넌트를 구현합니다.

prop 정보는 아래와 같습니다

export interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
  /**
   * ### Skeleton의 너비를 수동으로 지정할 떄 사용합니다.
   */
  width?: number | string;
  /**
   * ### Skeleton의 높이를 수동으로 지정할 떄 사용합니다.
   */
  height?: number | string;
  /**
   * ### `default` | `circular` | `rounded` 의 세 가지 값을 가집니다.
   * @example
   * default - borderRadius : '12px'
   * circular && rounded - borderRadius: '100%'
   */
  variant?: SkeletonVariant;
  /**
   * ### children prop을 사용할 경우 스켈레톤의 사이즈가 자식 요소에 맞춰집니다.
   * @example
   * ```tsx
   * // width: 'fit-content', height: 'auto'
   * <Skeleton>
   *   <Toggle />
   * </Skeleton>
   * ```
   */
  children?: React.ReactNode;
}
  • 기본적인 구조는 MUI를 참고해 만들어졌습니다.

링크

시급한 정도

🏃‍♂️ 보통 : 최대한 빠르게 리뷰 부탁드립니다.

기타 사항

image

Copy link

height bot commented Oct 20, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link

changeset-bot bot commented Oct 20, 2024

🦋 Changeset detected

Latest commit: 9b97c0e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sopt-makers/ui Minor
docs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Brokyeom Brokyeom changed the title Feat/UI skeleton feat(ui): Skeleton 컴포넌트 제작 Oct 21, 2024
@Brokyeom Brokyeom changed the title feat(ui): Skeleton 컴포넌트 제작 feat(ui): Skeleton 컴포넌트 구현 Oct 21, 2024
@Brokyeom Brokyeom marked this pull request as ready for review October 21, 2024 09:15
@Brokyeom
Copy link
Member Author

Storybook

Copy link
Member

@suwonthugger suwonthugger left a comment

Choose a reason for hiding this comment

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

LGTM

추후에 스토리북이랑 컴포넌트 이렇게 설명 추가해나가면 좋을것 같아요 고생하셨어요!

Comment on lines +5 to +6
circular: '100%',
rounded: '100%',
Copy link
Member

@jungwoo3490 jungwoo3490 Oct 23, 2024

Choose a reason for hiding this comment

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

variant가 circular인 case와 rounded인 case의 차이가 있을까요?? 지금 variant로 분기되는 스타일이 radius밖에 없어보이는데, 두 case의 radius 값이 동일해서 혹시 다른 차이가 있는지 궁금해요!!

Copy link
Member Author

Choose a reason for hiding this comment

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

cricular: 높이, 너비가 같은 원형
rounded: 높이, 너비가 다를 경우에 사용되는 스타일 (e.g. button rounded lg)

의 용도로 구분해두긴 했습니다. (레퍼런스)

Copy link
Member Author

Choose a reason for hiding this comment

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

추후에 variant 에 따라서 스타일이 달리질 것을 염두해서 분리해두려는 목적도 있습니다!

@Brokyeom Brokyeom merged commit be92ccf into main Oct 27, 2024
1 check passed
@Brokyeom Brokyeom deleted the feat/ui-skeleton branch October 27, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants