monday-ui-react-core
Version:
Official monday.com UI resources for application development in React.js
79 lines (78 loc) • 2.03 kB
TypeScript
import React, { ReactElement } from "react";
import { ModalWidth } from "./ModalHelper";
export interface ModalProps {
/**
* Id of the modal, used internally and for accessibility
*/
id?: string;
"data-testid"?: string;
/**
* Show/hide the Dialog
*/
show: boolean;
/**
* Heading for the modal, mandatory when ModalHeader isn't provided in children
*/
title?: string;
/**
* Description for the modal title
*/
description?: string;
/**
* Called when the modal is closed (by close button/click outside/esc key)
*/
onClose: () => void;
/**
* Makes the dialog behave like a modal (preventing closing on click outside of
* ESC key)..
*/
alertDialog?: boolean;
/**
* Used for the fromOrigin animation
*/
triggerElement?: Element;
/**
* Set the modal's width. Can be one of the presets or any custom size
*/
width?: typeof ModalWidth | string;
/**
* @deprecated
*/
hideCloseButton?: boolean;
/**
* Aria label for the close button
*/
closeButtonAriaLabel?: string;
/**
* Add gaps between parts of the modal
*/
contentSpacing?: boolean;
/**
* classNames for specific parts of the dialog
*/
classNames?: {
container?: string;
overlay?: string;
modal?: string;
};
/**
* Dialog content
*/
children?: ReactElement | ReactElement[];
/**
* z-index attribute of the container
*/
zIndex?: number;
/**
* If true, the modal will unmount when it's not shown
*/
unmountOnClose?: boolean;
}
declare const _default: ((import("../../types/VibeComponent").default<ModalProps, unknown> & Partial<{
width: typeof ModalWidth;
}>) | (React.FC<ModalProps> & Partial<{
width: typeof ModalWidth;
}>)) & {
width: typeof ModalWidth;
};
export default _default;