mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-24 01:38:26 +02:00
Allow toast interaction when dialog is open
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import FocusTrap from 'focus-trap-react';
|
import { FocusTrap } from 'focus-trap-react';
|
||||||
import * as m from 'motion/react-m';
|
import * as m from 'motion/react-m';
|
||||||
import type { ReactNode } from 'react';
|
import type { ReactNode } from 'react';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
@@ -47,7 +47,11 @@ export function Overlay({
|
|||||||
return (
|
return (
|
||||||
<Portal name={portalName}>
|
<Portal name={portalName}>
|
||||||
{open && (
|
{open && (
|
||||||
<FocusTrap>
|
<FocusTrap
|
||||||
|
focusTrapOptions={{
|
||||||
|
allowOutsideClick: true, // So we can still click toasts and things
|
||||||
|
}}
|
||||||
|
>
|
||||||
<m.div
|
<m.div
|
||||||
className={classNames('fixed inset-0', zIndexes[zIndex])}
|
className={classNames('fixed inset-0', zIndexes[zIndex])}
|
||||||
initial={{ opacity: 0 }}
|
initial={{ opacity: 0 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user