UNPKG

@hakit/components

Version:
26 lines 1.23 kB
import { ReactNode } from 'react'; type Extendable = React.ComponentPropsWithoutRef<"div">; export interface ModalProps extends Omit<Extendable, "title"> { /** triggers the modal opening */ open: boolean; /** the react layout to include inside the Modal */ children: React.ReactNode; /** The title of the dialog */ title?: ReactNode; /** the description of the modal */ description?: ReactNode; /** triggered when the users pressed the close button, this is also triggered when the escape key is pressed */ onClose: () => void; /** any prop to pass to the backdrop element */ backdropProps?: React.ComponentProps<"div">; /** react elements to render next to the close button */ headerActions?: () => ReactNode; /** the animation duration modal animation in seconds @default 0.25 */ animationDuration?: number; /** Automatically close the modal after the provided number of seconds */ autocloseSeconds?: number; } /** The modal component was built to easily generate a popup dialog from any element by passing through an "open" value */ export declare const Modal: import('react').NamedExoticComponent<ModalProps>; export {}; //# sourceMappingURL=index.d.ts.map