Repository navigation
Conversation
|
|
constantly-dev
left a comment
There was a problem hiding this comment.
수고하셨습니다! 코멘트 확인해주세요~
| rounded?: 'md' | 'lg'; | ||
| } | ||
|
|
||
| export const useResolvedProps = ({ intent, shape, theme, rounded }: UseResolvedProps) => { |
There was a problem hiding this comment.
button 컴포넌트 interface가 변경되면서 useResolvedProps로 이전 interface의 호환성을 가져가기 위함이 맞을까요?
물론 개인적인 생각이지만 호환성을 위해서는 필요하지만 이렇게 진행하게 되면 결국 레거시가 또 추가되는 느낌이 들어서..! 이후에 각 팀에서 interface 최신화해주고, 없애는 것은 어떨까요?
| const [scrollDirection, setScrollDirection] = useState<'up' | 'down' | null>(null); | ||
|
|
||
| useEffect(() => { | ||
| let lastScrollY = window.pageYOffset; |
There was a problem hiding this comment.
클로저로 구현된 거 같은데 맞을까요?? 지금도 잘 작동할 것 같고 useRef를 사용해도 동일하게 작동하겠네요!
| interface UseResolvedProps { | ||
| intent: ButtonIntent; | ||
| shape: ButtonShape; | ||
| theme?: ButtonColorTheme; | ||
| rounded?: 'md' | 'lg'; | ||
| } |
There was a problem hiding this comment.
| interface UseResolvedProps { | |
| intent: ButtonIntent; | |
| shape: ButtonShape; | |
| theme?: ButtonColorTheme; | |
| rounded?: 'md' | 'lg'; | |
| } | |
| type UseResolvedProps = Pick<ButtonProps, pick_union> |
새로 작성하지 않는게 좋을 것 같아요
There was a problem hiding this comment.
hooks.ts에서 Button.tsx의 타입을 참조하면 Button.tsx -> hooks.ts, hooks.ts -> Button.tsx 형태로 순환참조가 걸릴것 같아요! 그래도 일단 ButtonProps를 import할 때 import type으로 import해와서 사용하는게 좋을까요?
…ystem into refactor/button-theme-sync
|
@imddoy 이번 스프린트에서 급하게 Button 컴포넌트에 variants로 text 추가된걸 사용해야돼서 제가 수정했어요.. 사과드립니다.. |
변경사항
링크
시급한 정도
🏃♂️ 보통 : 최대한 빠르게 리뷰 부탁드립니다.
기타 사항