-
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
[Task] 모달 컴포넌트 추상화 #56
Conversation
react-portal dependency 추가
Modal.tsx 추가
useModal.tsx 추가
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
} | ||
|
||
const useModal = ({ initialOpen = false }: UseModalProps = {}) => { | ||
const [isOpen, setIsOpen] = useState(initialOpen); |
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/Modal.tsx
Outdated
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
zIndex: '9999', |
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.
zIndex 값 매직넘버로 관리되면 좋을것 같은데 의견이 궁금해요~
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.
감사합니다! 모달 디자인 고도화되면 같이 고도화해봐유
modalConstant.ts 추가
react-portal 라이브러리 제거
🤔 해결하려는 문제가 무엇인가요?
🎉 변경 사항
🙏 여기는 꼭 봐주세요!
사용 방법
useModal에서 불러온 openModal, closeModal을 원하는 곳에서 호출합니다.
🌄 스크린샷
📚 참고