diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 7cdf282..621c410 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -23,6 +23,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }) disableTransitionOnChange storageKey="taskify-theme" > +
{children} diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index c37a5af..17aadd5 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -16,7 +16,7 @@ export default function NotFound() { return ( <> -
+

앗, 접근할 수 없는 페이지입니다 diff --git a/src/components/card/Card.tsx b/src/components/card/Card.tsx index daa0474..b42b835 100644 --- a/src/components/card/Card.tsx +++ b/src/components/card/Card.tsx @@ -73,7 +73,9 @@ export default function Card({
{/* 제목 */} -

{title}

+

+ {title} +

(null); + useEffect(() => { + if (typeof window !== "undefined") { + setPortal(document.getElementById("portal")); + } + }, []); + useEffect(() => { if (open) { document.body.style.overflow = "hidden"; @@ -40,7 +47,9 @@ function Modal({ open, children, size = "lg", isOpenModal, className }: ModalPro } as const )[size] ?? "min-w-[584px] max-w-lg"; - return ( + if (!portal) return null; + + return createPortal( {open && ( )} - + , + portal, ); } @@ -79,17 +89,36 @@ type ModalHeaderProps = { onClose?: () => void; className?: string; titleStyle?: string; + extraBtn?: React.ReactNode; + btnStyle?: string; }; -function ModalHeader({ title, children, onClose, className, titleStyle }: ModalHeaderProps) { +function ModalHeader({ + title, + children, + onClose, + className, + titleStyle, + btnStyle, + extraBtn, +}: ModalHeaderProps) { return (

{title}

{children} - {onClose && ( - - )} +
+ {extraBtn} + {onClose && ( + + )} +
); } diff --git a/src/components/modal/cardModal/DetailCardModal.tsx b/src/components/modal/cardModal/DetailCardModal.tsx index c1bf5ce..f18593e 100644 --- a/src/components/modal/cardModal/DetailCardModal.tsx +++ b/src/components/modal/cardModal/DetailCardModal.tsx @@ -147,17 +147,25 @@ export default function DetailCardModal({ isOpen, setIsOpen, setColumns }: Modal setIsOpen(false)} - className="tablet:items-center items-start justify-start" - titleStyle="pt-12 tablet:pt-0" - > - - + className="tablet:h-8 h-[70px]" + titleStyle="overflow-hidden text-ellipsis pc:w-[500px] tablet:w-[480px] self-end tablet:self-center" + btnStyle="self-start tablet:self-center" + extraBtn={ + + } + >