fix: relocate focus trap

This commit is contained in:
MAZE 2024-04-22 23:47:57 +03:30
parent 908fe01c5e
commit 8596a0014c
2 changed files with 14 additions and 13 deletions

View file

@ -54,7 +54,8 @@ export function Modal({
<Portal>
<AnimatePresence>
{show && (
<>
<FocusTrap>
<div>
<motion.div
animate="show"
className={styles.overlay}
@ -64,7 +65,6 @@ export function Modal({
onClick={onClose}
onKeyDown={onClose}
/>
<FocusTrap>
<div className={styles.modal}>
<motion.div
animate="show"
@ -80,8 +80,8 @@ export function Modal({
{children}
</motion.div>
</div>
</div>
</FocusTrap>
</>
)}
</AnimatePresence>
</Portal>

View file

@ -1,4 +1,5 @@
.tooltip {
z-index: 99;
width: max-content;
padding: 6px 12px;
font-size: var(--font-xsm);