-
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] Chip 컴포넌트 구현 #27
Conversation
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.
수고하셨습니다🤗
packages/theme/src/color.ts
Outdated
import { black } from "../../wow-tokens/dist/color.js"; | ||
|
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.
p3;
color 에서 black 을 가져오고 있어서 이 import 는 없어도 될 것 같습니다!
CloseButton import문만 변경되고 파일명 자체가 변경이 안 돼서 빌드 실패하는 거 같으니 확인 부탁드려요~ |
4200713
to
8ff133b
Compare
|
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.
수고하셨어용~~
3a66d05
to
c0109bd
Compare
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에 반영해주셔도 됩니다!
bgColor: "blue.500", | ||
shadow: "0px 0.25rem 0.5rem 0px rgba(16, 43, 74, 0.20)", | ||
}, | ||
_pressed: { bgColor: "blue.400" }, |
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.
p2;
pressed
했을 때 스타일이 바뀌지 않는데 확인 부탁드립니다!
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.
허허 clickabled:true
속성을 줘야지만 스타일이 바뀐답니닷 😉
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.
__pressed
는 data-pressed
나 aria-pressed
속성이 있어야 동작하는 것 같아요!
그래서 따로 data-pressed 속성을 전달해야 pressed css 적용이 되는 것 같더라구용
if (event.key === "Enter" || event.key === " ") { | ||
setIsChecked((prev) => !prev); | ||
onKeyDown?.(); | ||
} | ||
} |
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.
p3;
KeyUp
시에 토글되도록 하고 KeyDown
했을 때는 pressed
상태로 설정하면 어떨까요? 지금은 꾹 누르면 계속 토글되는 것 같아요!
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.
엇 그렇게 해 두면 항상 토글이 되어서 꾸우욱 누르고있을때만 pressed
상태가 유지될것 같아용
그래서 KeyDown 동작이 끝나면 토글이 1회 되게끔 구현해뒀어요~!!!
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.
엇 뭔가 위 문제도 그렇고 제 노트북 입력이 좀 이상한 것 같기도 하네요...?ˀ 체크박스에서도 pressed
를 제가 처음에 확인을 못했거든요 ㅜ ㅜ 저는 clickable
줘도 pressed
스타일링은 안보이고(마우스, 키보드) 꾹 누르면 요렇게 동작합니다(키보드)
default.mov
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.
꾹 눌렀을 때 의도한 동작은 영상 첨부해주신 것이 맞기는 해요!! 🥹 clickable
부여되었을 때 스타일링이 마우스 키보드 눌러주었을때의 스타일링이 적용된거예용 (배경 파란색)
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.
수고하셨습니다.... 👍
아래 forwardRef 타입 관련해서 참고하면 좋을만한 코드가 있어서 가져왔는데 아래 코드에서도 ref는 any로 처리했네요...
추후 더 찾아보고 해결하는 걸로...
https://github.com/radix-ui/primitives/blob/main/packages/react/primitive/src/Primitive.tsx
🎉 변경 사항
BasicButtonProps
타입을 만들었어요!mono
관련된 컬러 토큰이 없길래 추가했습니당.🚩 관련 이슈
#24
🙏 여기는 꼭 봐주세요!
FilterChipGroup
,InputChipGroup
컴포넌트를 새로 만들 예정입니다. 이 때, 키보드 구현도 같이 해둘 거예요!(Input Chip은 아래 사진 예시와 같음)
구현하고자 하는 방법... 간단예시
타임어택 이슈로 테스트 코드는 다른 PR에 올릴게요! 🥹