Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/shared/ui/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,29 @@ export function Modal({
animate={MODAL_MOTION.animate}
exit={MODAL_MOTION.exit}
transition={MODAL_MOTION.transition}
className={cn('fixed inset-0 z-50 flex w-full items-center justify-center', className)}
className={cn('fixed inset-0 z-50 flex w-full items-center justify-center')}
Comment thread
ujinsim marked this conversation as resolved.
Outdated
>
<div className="absolute inset-0 bg-black/50" onClick={handleOutsideClick} />
Comment thread
ujinsim marked this conversation as resolved.
<ModalContent>{children}</ModalContent>
<ModalContent className={className}>{children}</ModalContent>
</motion.div>
</Portal>
);
}

export function ModalContent({ children }: { children: React.ReactNode }) {
export function ModalContent({
children,
className,
}: {
children: React.ReactNode;
className?: string;
}) {
return (
<Flex
role="dialog"
aria-modal="true"
justifyContent="center"
alignItems="center"
className="relative z-50 rounded-lg bg-white p-6"
className={cn('relative z-50 rounded-lg bg-white p-6', className)}
>
{children}
</Flex>
Expand Down