Skip to content

Conversation

@seongminn
Copy link
Member

@seongminn seongminn commented Feb 28, 2024

🌍 이슈 번호

✅ 작업 내용

  • 모달 컴포넌트 리팩토링
    • 혹시 모를 상황을 위해 기존 modal 컴포넌트는 유지하고 dialog라는 이름으로 개선된 모달 컴포넌트를 생성했습니다.
    • context로 모달 open과 관련한 상태를 공유하고, 마찬가지로 상태를 변경하는 함수도 공유합니다.
    • Trigger 컴포넌트에 바인딩 된 onClick 핸들러를 통해 모달 state를 toggling합니다.
    • Close 컴포넌트에 바인딩 된 onClick 핸들러를 통해 모달 state를 false로 변경합니다.

📝 참고 자료

  • cheerTalkModal과 관련하여 dialog 컴포넌트로 교체를 해둔 상태입니다. 확인해보시면 좋을 것 같습니다.

♾️ 기타

  • 애니메이션 방향을 설정할 수 있도록 한다면 사이드바에서도 사용할 수 있을 것 같네요!
  • ci/cd가 말썽이라 스토리북은 여길 참고해주세요.

@seongminn seongminn added the refactor Other changes (non-feature) label Feb 28, 2024
@seongminn seongminn self-assigned this Feb 28, 2024
Copy link
Contributor

@ohprettyhak ohprettyhak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as props 까지 잘 구현되었네요. 기존의 Modal 컴포넌트를 제거하고, 해당 컴포넌트의 이름을 모달로 변경하는 것이 좋을 거 같습니다!
앞으로 컴포넌트 구현 시 참고하도록 하겠습니다 :) 너무 고생하셨습니다! 👍👍

@seongminn
Copy link
Member Author

as props 까지 잘 구현되었네요. 기존의 Modal 컴포넌트를 제거하고, 해당 컴포넌트의 이름을 모달로 변경하는 것이 좋을 거 같습니다! 앞으로 컴포넌트 구현 시 참고하도록 하겠습니다 :) 너무 고생하셨습니다! 👍👍

해당 컴포넌트가 사이드바에도 사용될 수 있을 거라 생각했는데, 그런 점에서 sheet, dialog 등을 포함하는 개념인 모달이 더 적절할 수 있겠네요. 반영해서 커밋 추가하겠습니다ㅎㅎ

@seongminn seongminn merged commit 6e18556 into main Feb 29, 2024
@seongminn seongminn deleted the refactor/modal branch February 29, 2024 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Other changes (non-feature)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] modal 컴포넌트 리팩토링

3 participants