-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feature] 모집 게시글 상세보기 페이지 마크업 #61
Conversation
storybook link -> https://637c707cf24ecaa36bad2e45-kokpfqumhh.chromatic.com/ |
const dummyArticlePreview: ArticlePreviewType = { | ||
id: 1, | ||
title: '모집 테스트1', | ||
location: { | ||
id: 2, | ||
name: Location.BUSAN, | ||
}, | ||
category: { | ||
id: 1, | ||
name: Category.STUDY, | ||
}, | ||
commentCount: 31, | ||
scrapCount: 12, | ||
thumbnail: 'https://avatars.githubusercontent.com/u/90585081?v=4', | ||
maxCapacity: 5, | ||
currentCapacity: 3, | ||
status: ArticleStatus.PROGRESS, | ||
createdAt: '2021-04-03T18:45:19Z', | ||
}; | ||
|
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.
더미 데이터는 constants 폴더에 정의해놓고 사용하고 계시군요~ 좋은 것 같습니다
const ParticipantButton = styled.button` | ||
display: flex; | ||
gap: 4px; | ||
padding: 0; | ||
height: 1.7rem; | ||
align-items: center; | ||
border: none; | ||
background-color: ${({ theme }) => theme.white}; | ||
&:hover { | ||
cursor: pointer; | ||
} | ||
`; |
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.
향후에 mantine
의 Button
사용해서 구현해보는 것도 좋을 것 같습니다
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.
노력해보겠습니다!
<Badge color={getBadgeColor(id)} size="sm"> | ||
{content} | ||
<Badge color={color} size={size} radius="sm"> | ||
<BadgeContent>{content}</BadgeContent> |
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.
BadgeContent
라는 요소가 필요한 이유가 있을까요? 아니라면 바로 children으로 넣어주는게 더 좋아보여요
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.
텍스트 크기를 적용하려고 했던건데 빈 스타일이 됐네요! 제거하겠습니다~
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.
고생하셨어요! 상수화가 잘되어있어서 백엔드에서도 활용하면 좋을 것 같아요.
/** | ||
* 카테고리 id, 지역 id 등 뱃지 옵션의 id를 입력합니다. | ||
* id를 통해 색상이 결정됩니다. | ||
*/ | ||
id: number; | ||
color: string; |
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.
상위 컴포넌트에서 id 값을 통해 컬러를 골라 전달해주도록 바뀐 게 맞을까요?
id에서 color로 바뀐 것 같은데 주석도 변경되어야할 것 같아요.
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.
어..? 분명 바꿨었던 것 같은데 꿈이었나봐요...
Article Tag Props description 수정, 불필요한 Wrapper Element 제거
#64 |
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.
고생하셨습니다~
storybook link -> https://637c707cf24ecaa36bad2e45-hgxwwnpnbv.chromatic.com/ |
체크 리스트
작업 내역
Location
,Category
관련 enum 및 interface 정의ArticleTag
컴포넌트에서 color를 직접 받도록 변경utils/color.ts
에 정의문제 상황과 해결
비고