mirror of
https://github.com/remvze/moodist.git
synced 2025-12-17 08:54:13 +00:00
fix: relocate focus trap
This commit is contained in:
parent
908fe01c5e
commit
8596a0014c
2 changed files with 14 additions and 13 deletions
|
|
@ -54,17 +54,17 @@ export function Modal({
|
|||
<Portal>
|
||||
<AnimatePresence>
|
||||
{show && (
|
||||
<>
|
||||
<motion.div
|
||||
animate="show"
|
||||
className={styles.overlay}
|
||||
exit="hidden"
|
||||
initial="hidden"
|
||||
variants={variants.overlay}
|
||||
onClick={onClose}
|
||||
onKeyDown={onClose}
|
||||
/>
|
||||
<FocusTrap>
|
||||
<FocusTrap>
|
||||
<div>
|
||||
<motion.div
|
||||
animate="show"
|
||||
className={styles.overlay}
|
||||
exit="hidden"
|
||||
initial="hidden"
|
||||
variants={variants.overlay}
|
||||
onClick={onClose}
|
||||
onKeyDown={onClose}
|
||||
/>
|
||||
<div className={styles.modal}>
|
||||
<motion.div
|
||||
animate="show"
|
||||
|
|
@ -80,8 +80,8 @@ export function Modal({
|
|||
{children}
|
||||
</motion.div>
|
||||
</div>
|
||||
</FocusTrap>
|
||||
</>
|
||||
</div>
|
||||
</FocusTrap>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</Portal>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
.tooltip {
|
||||
z-index: 99;
|
||||
width: max-content;
|
||||
padding: 6px 12px;
|
||||
font-size: var(--font-xsm);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue