Skip to content
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

feat : 모달 컴포넌트 구현 #69

Merged
merged 6 commits into from
Jun 1, 2024
Merged

feat : 모달 컴포넌트 구현 #69

merged 6 commits into from
Jun 1, 2024

Conversation

SeieunYoo
Copy link
Collaborator

@SeieunYoo SeieunYoo commented May 6, 2024

🛠 관련 이슈

🌱 PR 포인트

  • Modal 컴포넌트 구현
  • Overlay 컴포넌트 사용해서 뒤에 딤 부분을 처리했습니다.
  • ModalHeader Content Footer 부분으로 나눠서 합성 컴포넌트 방식으로 구현했습니다.

UseCase

const modalProps = useOpen();

{modalProps.open && (
        <Modal {...modalProps}>
          <Modal.Header>기록을 삭제하시겠습니까?</Modal.Header>
          <Modal.Content>그만하기 선택시 기록중인 글은 저장되지 않고 삭제됩니다.</Modal.Content>
          <Modal.Footer>
            <Modal.Button onClick={modalProps.onClose}>취소</Modal.Button>
            <Modal.Button css={{ color: theme.color.orange }}>그만하기</Modal.Button>
          </Modal.Footer>
        </Modal>
      )}

📸 스크린샷 / 링크

Modal 컴포넌트
image

📎 레퍼런스

❗ 이슈사항 / 기타사항 / 에러슈팅

@shubug1015
Copy link
Member

혹시 overlay 영역 클릭 시 모달 닫는 액션은 따로 없는걸까용?

@SeieunYoo SeieunYoo merged commit 1629a7c into main Jun 1, 2024
@SeieunYoo SeieunYoo deleted the feat/modal branch June 1, 2024 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨feature feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] 공통 컴포넌트 세팅
2 participants