Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei authored and lawvs committed Oct 12, 2024
1 parent 641383f commit 19d3317
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/renderer/src/components/ui/modal/stacked/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export const ModalInternal = memo(
<ModalOverlay
blur={overlayOptions?.blur}
className={cn(overlayOptions?.className, {
hidden: modalSettingOverlay || item.overlay ? false : true,
hidden: item.overlay ? false : !modalSettingOverlay,
})}
/>
)
Expand Down
4 changes: 4 additions & 0 deletions apps/renderer/src/components/ui/modal/stacked/overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { forwardRef } from "react"
import { m } from "~/components/common/Motion"
import { cn } from "~/lib/utils"

import { softSpringPreset } from "../../constants/spring"

export const ModalOverlay = forwardRef(
(
{
Expand All @@ -23,10 +25,12 @@ export const ModalOverlay = forwardRef(
ref={ref}
id="modal-overlay"
className={cn(
// NOTE: pointer-events-none is required, if remove this, when modal is closing, you can not click element behind the modal
"!pointer-events-none fixed inset-0 rounded-[var(--fo-window-radius)] bg-zinc-50/80 dark:bg-neutral-900/80",
blur && "backdrop-blur-sm",
className,
)}
transition={softSpringPreset}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
Expand Down

0 comments on commit 19d3317

Please sign in to comment.