@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
12 lines (11 loc) • 768 B
TypeScript
import React from "react";
import type { ModalProps } from "./types";
export interface MouseCoordinates {
clientX: number;
clientY: number;
}
export declare const coordsAreInside: ({ clientX, clientY }: MouseCoordinates, { left, top, right, bottom }: DOMRect) => boolean;
export declare function getCloseHandler(modalRef: React.RefObject<HTMLDialogElement>, header: ModalProps["header"], onBeforeClose: ModalProps["onBeforeClose"]): (() => false | void | undefined) | undefined;
export declare const BODY_CLASS_LEGACY = "navds-modal__document-body";
export declare const BODY_CLASS = "aksel-modal__document-body";
export declare function useBodyScrollLock(modalRef: React.RefObject<HTMLDialogElement>, portalNode: HTMLElement | null, isNested: boolean): void;