-
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
[FEAT] 마감기한 공통컴포넌트 퍼블리싱 #39
Conversation
eff2ad8
to
491ec35
Compare
src/components/commons/BtnDate.tsx
Outdated
display: flex; | ||
width: 1.4rem; | ||
height: 1.4rem; | ||
justify-content: center;s |
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.
여기 s 오타낫어요
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.
눈썰미미쳣다
src/components/commons/BtnDate.tsx
Outdated
display: flex; | ||
width: fit-content; | ||
min-width: 18rem; | ||
padding: ${({ size }) => (size === 'big' ? '0.5rem 1rem' : '0.5rem 1rem')}; |
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.
여기 big 일 경우 아닌 경우 패딩값 동일한 것 같습니다!!
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.
헉 근데 이 내용 디자인측에서 size에 대한 패딩값 고정해주셔서 삭제했습니다!!!
491ec35
to
196612e
Compare
src/components/commons/BtnDate.tsx
Outdated
align-items: center; | ||
`; | ||
|
||
const LineIcon = styled(Icons.Icn_line, { target: 'LineIcon' })<{ size: 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.
오홍 tartget을 사용하는 방법이 있군요!!
src/components/commons/BtnDate.tsx
Outdated
|
||
const XIcon = styled((props: React.SVGProps<SVGSVGElement> & { isClicked: boolean }) => { | ||
const { isClicked, ...rest } = props; | ||
return <Icons.Icn_xCricle {...rest} />; |
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.
해당 부분에 Imported JSX component Icn_xCricle must be in PascalCase or SCREAMING_SNAKE_CASE
라는 lint에러가 나서 해당 부분 네이밍 변경해주시면 좋을 것 같습니당!
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.
수정했습니다!!
e5d9b15
to
5d1ede0
Compare
5d1ede0
to
5e60c84
Compare
src/components/commons/BtnDate.tsx
Outdated
<BtnDateContainer> | ||
<CalanderIcon /> | ||
<TextWrapper isDefault={isDefaultDate} size={size}> | ||
{date} | ||
</TextWrapper> | ||
</BtnDateContainer> | ||
<LineIcon size={size} /> | ||
<BtnDateContainer> | ||
<ClockIcon /> | ||
<TextWrapper isDefault={isDefaultTime} size={size}> | ||
{time} | ||
</TextWrapper> | ||
</BtnDateContainer> |
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.
여기 BtnDateContainer
로 감싼 아이콘, date, time 정도만 달라지는 부분이 있는데 컴포넌트로 따로 빼면 코드 중복 줄일 수 있을 것 같습니다! 코드 길이도 짧아져서 가독성에도 더 좋을 것 같아요!
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.
넵 적용했어요!!
src/assets/svg/index.ts
Outdated
@@ -5,9 +5,18 @@ import Icn_nav_dashboard from '@/assets/svg/icn_nav_dashboard.svg?react'; | |||
import Icn_nav_setting from '@/assets/svg/icn_nav_setting.svg?react'; | |||
import Icn_nav_today from '@/assets/svg/icn_nav_today.svg?react'; | |||
|
|||
import Icn_calander from '../../assets/svg/calendar-minus-01.svg?react'; |
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.
css 호버 상태 진짜 복잡하네요 ㅠ 너무너무 고생하셨습니다 린트에러 없는 거 확인했어요!!!
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.
오 common 폴더로 옮겨주셧네요 감사합니당!!!
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.
디자인에서 중간에 바뀐 부분도 있어서 세세하고 고칠 부분이 많았을텐데 정말 수고 많으셨습니당 짱짱
작업 내용 🧑💻
BtnDate.tsx
BtnStagingDate.tsx
알게된 점 🚀
hover 시 다른 요소의 속성을 설정할 때 에러가 나는 경우,
target
설정을 통해 해결 가능하다.svg를 커스텀 할 때(색상 변경 등), 적용이 안된다면 각 속성이 포함된 태그를 잘 확인하는 것이 필요하다.
예를 들어, stroke 속성이
<path>
태그 내에 있다면stroke: black;
이 아닌 다음과 같이 적용할 수 있다.pressed 일 때의 스타일을
active
를 통해 적용하고자 하였는데, pressed와 clicked의 구분이 안된다는 문제가 있었습니다.하여
isPressed
와 같은 상태를 추가하여 구분하였다.리뷰 요구사항 💬
관련 이슈
close #29
스크린샷 (선택)
2024-07-07.16.27.18.mov