UNPKG

@rws-aoa/react-library

Version:

RWS AOA Design System

71 lines 1.99 kB
import { DialogContentProps, DialogProps, DialogTitleProps } from '@mui/material'; import { ReactNode } from 'react'; import { AoaModalCloseButtonProps } from '../modal-close-button/ModalCloseButton'; export interface AoaModalQAs { /** * Data-qa tag applied to the content */ content?: string; /** * Data-qa tag applied to the main modal */ modal?: string; /** * Data-qa tag applied to the title */ title?: string; } export interface AoaModalProps { /** * Any other props passed to the {@link DialogContent} */ readonly DialogContentProps?: DialogContentProps; /** * Any other props passed to the {@link Dialog} */ readonly DialogProps?: Omit<DialogProps, 'open'>; /** * Any other props passed to the {@link DialogTitle} */ readonly DialogTitleProps?: DialogTitleProps; /** * Optional for adding dialog actions below the content */ readonly dialogActions?: ReactNode; /** * The content to show in the modal */ readonly dialogContent: ReactNode; /** * Object of data-qa tags to pass to the modal */ readonly modalQas?: AoaModalQAs; /** * Whether the modal should be opened or not */ readonly open: boolean; /** * Title for the modal */ readonly topic: string; } /** * Constructs a modal using pre-defined Rijkswaterstaat styling * * @param props - Props to pass to the modal - {@link ModalProps} * @example * ```jsx * <AoaModal * topic='topic' * modalQas={{ * modal: 'modal', * content: 'content', * title: 'title', * }} * dialogContent={<div>SAMPLE</div>} * open={true} * /> * ``` */ export declare function AoaModal({ DialogProps, DialogTitleProps, DialogContentProps, modalQas, open, topic, dialogContent, dialogActions, closeAction }: AoaModalCloseButtonProps & AoaModalProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=Modal.d.ts.map