-
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
[style] 다이얼로그 컴포넌트 제작 #136
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.
radix-ui 매우 많이 참고해서 구현을 했습니당
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.
해당 컴포넌트는 애니메이션동작이 완료될 때까지 마운트 해제를 지연해줍니다
function handler(childHanlder?: (e: React.MouseEvent<HTMLButtonElement>) => void) { | ||
return (e: React.MouseEvent<HTMLButtonElement>) => { | ||
childHanlder?.(e); | ||
others.onClick?.(e); | ||
}; | ||
} |
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.
asChild
가 있으면 자식 컴포넌트로 렌더링을 대체합니다.
asChild
props가 존재할 경우 해당 컴포넌트에 부착한 click handler와 자식 컴포넌트의 click handler모두 실행시키기 위한 메서드 입니다.
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.
presence 하는 방법 framer-motion으로 밖에 안써봤는데 요렇게도 할 수 있네여 ㄷ.ㄷ 👍👍👍👍👍👍👍
tailwind.config.js
Outdated
@@ -13,7 +13,19 @@ module.exports = { | |||
colors: { | |||
white: '#FFFFFF', | |||
black: '#000000', | |||
error: '#EB001C', | |||
// error: '#EB001C', |
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.
빈 파일잉 있네영? 요거 지워야 되는 걸까여?
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/headless/Presence.tsx
Outdated
* prevAnimationName과 currentAnimationName이 다르다는 것은 애니메이션이 정상적으로 실행중이라는 뜻이다. | ||
* | ||
* state가 mounted상태가 됐을 때 | ||
* prevAnimationName에 애니메이션이 실행 될 때의 이름을 저장한 상태 | ||
* currentAnimationName엔 닫기 버튼을 누를 경우 실행되는 애니메이션 이름이 저장이 된 상태 |
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.
이런 방식이군여 👀 신기하네여
구현한 것
구현하지 않은 것
동작 확인
2024-02-07.3.24.57.mov