diff --git a/src/components/modal/modal.tsx b/src/components/modal/modal.tsx index 2049620..5a41181 100644 --- a/src/components/modal/modal.tsx +++ b/src/components/modal/modal.tsx @@ -14,6 +14,7 @@ interface ModalProps { children: React.ReactNode; lockBody?: boolean; onClose: () => void; + persist?: boolean; show: boolean; wide?: boolean; } @@ -22,6 +23,7 @@ export function Modal({ children, lockBody = true, onClose, + persist = false, show, wide, }: ModalProps) { @@ -50,40 +52,49 @@ export function Modal({ return () => document.removeEventListener('keydown', keyListener); }, [onClose, show]); + const animationProps = persist + ? { + animate: show ? 'show' : 'hidden', + } + : { + animate: 'show', + exit: 'hidden', + initial: 'hidden', + }; + + const content = ( + + + + + + + + + {children} + + + + + ); + return ( - - {show && ( - - - - - - - - - - {children} - - - - - )} - + {persist ? ( + {content} + ) : ( + {show && content} + )} ); } diff --git a/src/components/toolbox/countdown-timer/countdown-timer.tsx b/src/components/toolbox/countdown-timer/countdown-timer.tsx index 64642e7..5c6c71c 100644 --- a/src/components/toolbox/countdown-timer/countdown-timer.tsx +++ b/src/components/toolbox/countdown-timer/countdown-timer.tsx @@ -12,7 +12,7 @@ interface TimerProps { export function CountdownTimer({ onClose, show }: TimerProps) { return ( - + Countdown Timer