-
Notifications
You must be signed in to change notification settings - Fork 51
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
충남대 FE_임세빈_1주차 과제 #73
base: yimsebin
Are you sure you want to change the base?
Conversation
README.md에 기능 목록 정리
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다~
STEP2 Grid 컴포넌트를 구현할 때, children에 JSX 요소 자체를 넣고 싶었는데 해결방법을 찾지 못해 string 형의 배열로 사용하였습니다. element를 배열에 넣어 구현하는 방법이 궁금합니다.
ReactNode를 타입으로 받아서 그대로 렌더하면 됩니다. https://react.dev/reference/react/Children 요 문서를 참고해보세요!
/** | ||
* true : 활성화느낌 / false : 비활성화느낌 | ||
*/ | ||
theme?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
theme이 boolean인건 다소 어색하게 느껴져요!
차라리 'primary' | 'light' 이런식의 네이밍이 더 직관적일 것 같아요
amount = 1, | ||
}: GoodsItemProps) => { | ||
return ( | ||
<div style={{width:'120px'}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prettier가 적용이 안된 것 같네요? 👀
if (ratio == "square") { | ||
ratio = 1 | ||
} | ||
let borderRadius: string; | ||
if (radius == "circle") { | ||
borderRadius = '50%' | ||
} else { | ||
borderRadius = `${radius}px` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Props로 넘어오는 값을 직접 수정하면 안됩니다.
ratio? : number | 'auto' | 'square'; | ||
radius? : number | "circle" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 어떤 역할을 하는 Props들인지 직관적으로 이해하기 어려워요
- 내부 동작을 예측할 수 없어요
안녕하세요, 1주차 과제 PR 드립니다!
✅ STEP1
✅ STEP2
✅ STEP3
❓ 궁금한 점
STEP2 Grid 컴포넌트를 구현할 때, children에 JSX 요소 자체를 넣고 싶었는데 해결방법을 찾지 못해 string 형의 배열로 사용하였습니다. element를 배열에 넣어 구현하는 방법이 궁금합니다.
감사합니다!