Skip to content

Commit

Permalink
Merge pull request #23 from c3rf1g/patch-1
Browse files Browse the repository at this point in the history
Update Modal.tsx
  • Loading branch information
mainsmirnov committed May 3, 2024
2 parents ec98300 + 3718e21 commit 65cdd79
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Overlays/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onAnim
snapPoints?: (number | string)[];
/** Snap point index at which the overlay begins to fade, enhancing visual cues for modal depth. */
fadeFromIndex?: never;
/** Determines if the modal can be closed by user interactions */
dismissible?: boolean;

}

type ModalWithComponents = ForwardRefExoticComponent<ModalProps & RefAttributes<HTMLDivElement>> & {
Expand Down Expand Up @@ -73,6 +76,7 @@ export const Modal = forwardRef<HTMLDivElement, ModalProps>(({
fadeFromIndex,
modal,
preventScrollRestoration,
dismissible
...restProps
}, ref) => {
const container = useAppRootContext();
Expand All @@ -96,6 +100,7 @@ export const Modal = forwardRef<HTMLDivElement, ModalProps>(({
fadeFromIndex={fadeFromIndex}
modal={modal}
preventScrollRestoration={preventScrollRestoration}
dismissible={dismissible}
>
{trigger && <Drawer.Trigger asChild>{trigger}</Drawer.Trigger>}
<Drawer.Portal container={portal}>
Expand Down

0 comments on commit 65cdd79

Please sign in to comment.