-
Notifications
You must be signed in to change notification settings - Fork 2
[#3] 공통 컴포넌트 개발 #21
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
[#3] 공통 컴포넌트 개발 #21
Conversation
…n/common-components
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
이미지 파일이 꽤나 많아서 아로마 관련 이미지는 폴더를 따로 만들어서 관리하는게 좋을 것 같네요 🙇🏻 |
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.
고생하셨습니다 코멘트 확인 부탁드립니다!
저도 아로마 이미지는 폴더를 따로 만드는게 좋을 것 같습니다!
| const items: { label: string; href?: string; onClick?: () => void }[] = [ | ||
| { label: "마이페이지", href: "/my-page" }, | ||
| { label: "로그아웃", onClick: () => console.log("logout") }, | ||
| ]; |
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.
피그마 컴포넌트에선 마이페이지, 로그아웃만 나와있어서 고려하지 못했습니다.
해당 부분 수정해서 PR 업데이트 하겠습니다!
|
고생 많으셨습니다! |
| const Chip = ({ img, label }: ChipProps) => { | ||
| const [selected, setSelected] = useState(false); | ||
|
|
||
| return ( | ||
| <div | ||
| data-selected={selected} | ||
| className={cn( | ||
| "flex-center h-[38px] cursor-pointer rounded-full border text-body-sm tracking-[-0.02em]", | ||
| "transition-colors duration-150 ease-in-out hover:bg-gray100 hover:text-black", | ||
| "data-[selected=true]:bg-gray800 data-[selected=true]:text-white data-[selected=true]:hover:bg-gray800 data-[selected=true]:hover:text-white", | ||
| "pc:h-[48px] pc:text-body-md", | ||
| img | ||
| ? "gap-2 pl-2 pr-4 mobile:gap-[6px] mobile:pr-3" | ||
| : "px-[18px] mobile:px-3" | ||
| )} | ||
| onClick={() => setSelected(!selected)} | ||
| > |
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.
혹시 버튼 컴포넌트가 없어 임시로 작업해두신걸까요? 클릭 가능한 요소라면 접근성 개선을 위해 <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.
감사합니다 반영했습니다!
📄 PR 내용 요약
✅ 작업 내용 상세
피그마 Asset에는 아이템이 15개 있는데 스웨거 타입에선 19개가 있어서 이미지 갯수가 부족합니다.
우선 이미지 3개는 주석을 남겨뒀고,
/aroma-no-image.jpg로 추가해뒀습니다현재 aroma 관련 이미지가
public/images안에 전부 있는데,폴더 구조를 aroma로 따로 구분하는게 좋을지 의견 주시면 감사하겠습니다.
📸 스크린샷
💬 참고 사항
테스트 이미지는
public/images/test에 있습니다!스토리북에서 확인 가능하지만, 필요하다면
http://localhost:3000/example에서도 확인 가능합니다.