Skip to content

Feat/image: Image 컴포넌트 구현 #18

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

Merged
merged 5 commits into from
Feb 20, 2023
Merged

Feat/image: Image 컴포넌트 구현 #18

merged 5 commits into from
Feb 20, 2023

Conversation

iyu88
Copy link
Member

@iyu88 iyu88 commented Feb 20, 2023

size 와 shape 을 결정할 수 있는 Image 컴포넌트를 구현했습니다.

🤠 개요

💫 설명

  • Image Props 설명

    • src : 이미지 URL 이나 경로

    • alt : 이미지 설명

    • size : small, medium, large 중 택 1

    • shape : circle, rounded 중 택 1

  • 로컬에서 스토리북 실행이 안되서 확인을 못했어요 ( 대신 확인해주시면 감사합니다 )

  • 기존에는 React-icon 도 표시할 수 있는 컴포넌트로 만들려고 했지만, 논의 끝에 해당 기능은 Button 컴포넌트에서 텍스트와 함께 구현하는 것으로 결정되었습니다.

📷 스크린샷 (Optional)

image
image
image

size 와 shape 을 결정할 수 있는 Image 컴포넌트를 구현했습니다.
@iyu88 iyu88 added the ✨ feat 기능 구현 label Feb 20, 2023
@iyu88 iyu88 self-assigned this Feb 20, 2023
@leesunmin1231
Copy link
Contributor

storybook 실행 해봤는데 잘 동작해요! 굿굿

@dohun31
Copy link
Contributor

dohun31 commented Feb 20, 2023

스크린샷이 필요해요

se030 and others added 4 commits February 20, 2023 22:35
* feat: DefaultProps<T> 유틸리티 타입 추가

HTMLElement T 리액트 노드가 가질 수 있는 속성들과 emotion의 css를 포함

* feat: DefaultPropsWithChildren<T> 유틸리티 타입 추가

- children을 꼭 가져야하는 컴포넌트에서 사용
- https://velog.io/@kkojae91/PropsWithChildren%EB%8A%94-%EC%95%88%EC%A0%84%ED%95%9C-%ED%83%80%EC%9E%85%EC%9D%BC%EA%B9%8C

* feat: utils, util-types 절대경로 설정 추가

- 유틸리티 타입을 위해 `src/utils`와 하위 types 디렉토리 생성
- `@types` 디렉토리 아래에서 .d.ts 파일에 선언해봤지만 적용이 되지 않음
- `@types/utils` 만들면 절대경로 설정 시 "Cannot import type declaration files. ts(6137)" 오류 발생
- react에서도 PropsWithChildren 등 유틸리티 타입들을 named export로 제공하고 있어 동일한 방식 사용
@iyu88 iyu88 merged commit d6afbb9 into main Feb 20, 2023
@iyu88 iyu88 deleted the feat/image branch February 20, 2023 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feat 기능 구현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants