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>
|
<Portal>
|
||||||
<AnimatePresence>
|
<AnimatePresence>
|
||||||
{show && (
|
{show && (
|
||||||
<>
|
<FocusTrap>
|
||||||
<motion.div
|
<div>
|
||||||
animate="show"
|
<motion.div
|
||||||
className={styles.overlay}
|
animate="show"
|
||||||
exit="hidden"
|
className={styles.overlay}
|
||||||
initial="hidden"
|
exit="hidden"
|
||||||
variants={variants.overlay}
|
initial="hidden"
|
||||||
onClick={onClose}
|
variants={variants.overlay}
|
||||||
onKeyDown={onClose}
|
onClick={onClose}
|
||||||
/>
|
onKeyDown={onClose}
|
||||||
<FocusTrap>
|
/>
|
||||||
<div className={styles.modal}>
|
<div className={styles.modal}>
|
||||||
<motion.div
|
<motion.div
|
||||||
animate="show"
|
animate="show"
|
||||||
|
|
@ -80,8 +80,8 @@ export function Modal({
|
||||||
{children}
|
{children}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
</FocusTrap>
|
</div>
|
||||||
</>
|
</FocusTrap>
|
||||||
)}
|
)}
|
||||||
</AnimatePresence>
|
</AnimatePresence>
|
||||||
</Portal>
|
</Portal>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
.tooltip {
|
.tooltip {
|
||||||
|
z-index: 99;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
font-size: var(--font-xsm);
|
font-size: var(--font-xsm);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue