UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

11 lines (10 loc) 599 B
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 | null>, header: ModalProps["header"], onBeforeClose: ModalProps["onBeforeClose"]): (() => false | void | undefined) | undefined; declare function useIsModalOpen(modalRef: HTMLDialogElement | null): boolean; export { useIsModalOpen };