Skip to content

Commit

Permalink
feat: add isTopModal on the modal ref handle (#105)
Browse files Browse the repository at this point in the history
* feat: add `isTopModal` on the modal ref handle

* Update Modal.tsx
  • Loading branch information
jquense authored Aug 1, 2024
1 parent d555a1f commit 2f7acc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface RenderModalBackdropProps {

/*
Modal props are split into a version with and without index signature so that you can fully use them in another projects
This is due to Typescript not playing well with index singatures e.g. when using Omit
This is due to Typescript not playing well with index signatures e.g. when using Omit
*/
export interface BaseModalProps extends TransitionCallbacks {
children?: React.ReactElement;
Expand Down Expand Up @@ -224,6 +224,7 @@ function useModalManager(provided?: ModalManager) {
export interface ModalHandle {
dialog: HTMLElement | null;
backdrop: HTMLElement | null;
isTopModal: () => boolean;
}

const Modal: React.ForwardRefExoticComponent<
Expand Down

0 comments on commit 2f7acc8

Please sign in to comment.