/** @module @citydna/common/Alert */ import React, { FunctionComponent } from "react"; import { DialogProps } from "@material-ui/core/Dialog"; export interface AlertProps extends Omit { /** Large title for the alert. */ title: string | React.ReactNode; /** Smaller text below the title. Optional. */ text?: string | React.ReactNode; /** Copy for the confirm/primary button. */ confirmText?: string; /** Function to call when the confirm button is clicked. */ onConfirm: () => void; /** Copy for the cancel/secondary button. */ cancelText?: string; /** Function to call when the cancel button is clicked. */ onCancel?: () => void; /** Pass a boolean to toggle the alert open/closed */ open: boolean; /** Pass a boolean to set the confirm button to loading state */ loading?: boolean; /** Called when the user clicks the backdrop. If not passed, the user must click a button to exit the alert. */ onClose?: () => void; } /** * A CityDNA branded alert box. Extends the [@material-ui/core/Dialog](https://material-ui.com/components/dialogs/) component. * Drop it into any component and it'll work - it uses a [@material-ui/core/Portal](https://material-ui.com/components/portal/) to always be on top. */ export declare const Alert: FunctionComponent; export default Alert; //# sourceMappingURL=index.d.ts.map