UNPKG

mt-flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS

46 lines (45 loc) 1.78 kB
import type { MutableRefObject } from 'react'; import { type ComponentPropsWithoutRef, type PropsWithChildren } from 'react'; import type { DeepPartial, FlowbiteBoolean, FlowbitePositions, FlowbiteSizes } from '../../'; import type { FlowbiteModalBodyTheme } from './ModalBody'; import type { FlowbiteModalFooterTheme } from './ModalFooter'; import type { FlowbiteModalHeaderTheme } from './ModalHeader'; export interface FlowbiteModalTheme { root: FlowbiteModalRootTheme; content: FlowbiteModalContentTheme; body: FlowbiteModalBodyTheme; header: FlowbiteModalHeaderTheme; footer: FlowbiteModalFooterTheme; } export interface FlowbiteModalRootTheme { base: string; show: FlowbiteBoolean; sizes: ModalSizes; positions: ModalPositions; } export interface FlowbiteModalContentTheme { base: string; inner: string; } export interface ModalPositions extends FlowbitePositions { [key: string]: string; } export interface ModalSizes extends Omit<FlowbiteSizes, 'xs'> { [key: string]: string; } export interface ModalProps extends PropsWithChildren<ComponentPropsWithoutRef<'div'>> { onClose?: () => void; position?: keyof ModalPositions; popup?: boolean; root?: HTMLElement; show?: boolean; size?: keyof ModalSizes; dismissible?: boolean; theme?: DeepPartial<FlowbiteModalTheme>; initialFocus?: number | MutableRefObject<HTMLElement | null>; } export declare const Modal: import("react").ForwardRefExoticComponent<ModalProps & import("react").RefAttributes<HTMLDivElement>> & { Header: import("react").FC<import("./ModalHeader").ModalHeaderProps>; Body: import("react").FC<import("./ModalBody").ModalBodyProps>; Footer: import("react").FC<import("./ModalFooter").ModalFooterProps>; };