Skip to content

Commit

Permalink
Merge pull request #21 from CNSeniorious000/main
Browse files Browse the repository at this point in the history
fix(ui): manually implement close-on-outside-click feature for modals
  • Loading branch information
ddiu8081 authored May 10, 2023
2 parents d83c17c + 115094d commit fb53af2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ui/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default (props: Props) => {
<Show when={api().isOpen}>
<div class="fixed inset-0 z-20 fcc">
<Portal>
<div {...api().backdropProps} class="fixed inset-0 bg-base opacity-60" />
<div {...api().backdropProps} class="fixed inset-0 bg-base opacity-60 pointer-events-auto" onclick={() => api().close()} />
</Portal>
<div {...api().containerProps}>
<div {...api().contentProps} class={`bg-base-100 transition-transform ease-out max-w-screen max-h-screen overflow-auto border-base shadow-lg ${containerBaseClass}`}>
Expand Down

0 comments on commit fb53af2

Please sign in to comment.