Skip to content

Commit

Permalink
feat: jsdoc 추가 및 태그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Aug 14, 2024
1 parent 8f46bf6 commit 3a4fdc4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/ui/src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ import { useCallback, useRef } from "react";

export interface ModalProps {
title: ReactNode;
children?: ReactNode;
closeModal: () => void;
children?: ReactNode;
}

/**
* @description 모달 컴포넌트입니다.
*
* @param {ReactNode} title - 모달 컴포넌트의 제목.
* @param {() => void} closeModal - 모달 컴포넌트를 닫기 위한 함수.
* @param {ReactNode} [children] - 모달 컴포넌트에 들어갈 자식 요소.
*/
const Modal = ({ title, children, closeModal }: ModalProps) => {
const overlay = useRef<HTMLDivElement>(null);

Expand All @@ -35,9 +42,9 @@ const Modal = ({ title, children, closeModal }: ModalProps) => {
<button className={closeButtonStyle} onClick={closeModal}>
X
</button>
<h1 className={css({ textStyle: "h1", textAlign: "center" })}>
<styled.h1 className={css({ textStyle: "h1", textAlign: "center" })}>
{title}
</h1>
</styled.h1>
{children}
</styled.dialog>
</Flex>
Expand Down

0 comments on commit 3a4fdc4

Please sign in to comment.