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

[TASK-61] feat: 캐로젤 공통 컴포넌트 구현 #18

Merged
merged 3 commits into from
Dec 29, 2024

Conversation

SangWoo9734
Copy link
Collaborator

📝 작업 내용

  • 캐로젤 UI 에서 공통적으로 포함되는 요소를 구현하였습니다.

📸 스크린샷

Dec-29-2024 15-02-33

@SangWoo9734 SangWoo9734 requested a review from dahyeo-n December 29, 2024 06:03
@SangWoo9734 SangWoo9734 self-assigned this Dec 29, 2024
@SangWoo9734 SangWoo9734 added feat 새로운 기능 추가 setting package.json 파일 수정 및 패키지 설치 Priority: Critical 우선순위 긴급 labels Dec 29, 2024
Copy link
Member

@dahyeo-n dahyeo-n left a comment

Choose a reason for hiding this comment

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

궁금한 사항 2가지만 질문 드렸습니다! approve 해두겠습니다 :)

interface DefaultCarouselPropsType<T> {
slides: T[];
renderSlide: (card: T) => ReactNode;
spaceSize?: 'small' | 'medium' | 'large';
Copy link
Member

Choose a reason for hiding this comment

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

아이콘 사이즈처럼 s, m, l 이렇게 통일하는 건 어떨까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

네! 좋습니다 수정하겠습니다_!

spaceSize?: 'small' | 'medium' | 'large';
}

const DefaultCarousel = <T,>({
Copy link
Member

Choose a reason for hiding this comment

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

<T,> 에서 ,는 뭔가요???

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이부분은 다른 코드 참고하면서 작성해서 들어간 것 같습니다..!

조금 알아보니 큰 의미는 없고, JSX 문법과 제네릭이 유사항 형태를 가지니 두 가지를 구분하기 위해서 타입 하나만 받는 경우에 ,를 임의로 추가하기도 한다고 합니다..! 이부분은 수정하겠습니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

이게 VS 코드에서도 컴포넌트에 제네릭을 활용하려고 할 때는 <T> 작성하니 JSX로 인식해버리네요..

Copy link
Member

Choose a reason for hiding this comment

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

억... 일단 그럼 ,로 둘까요?..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

참고

generic in tsx로 검색했을 때 먼저 나오는 블로그입니다. tsx에서 제네릭을 쓸 때 대안으로 여러 방식을 사용할 수 있긴한데 현재 방식과 크게 다르지 않은 것 같네요..!

Copy link
Member

Choose a reason for hiding this comment

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

그러네여 그럼 ,로 가시져

Copy link
Member

@dahyeo-n dahyeo-n left a comment

Choose a reason for hiding this comment

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

아 그리고 PR 제목에 label이 누락돼 있어서 지난 PR까지 확인하셔서 label 추가해주시면 감사하겠습니다 :)

@SangWoo9734 SangWoo9734 changed the title [TASK-61] 캐로젤 공통 컴포넌트 구현 [TASK-61] feat: 캐로젤 공통 컴포넌트 구현 Dec 29, 2024
@SangWoo9734 SangWoo9734 merged commit 6d4ddd9 into dev Dec 29, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 새로운 기능 추가 Priority: Critical 우선순위 긴급 setting package.json 파일 수정 및 패키지 설치
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants