/** @module @airtable/blocks/ui: Dialog */ /** */ import PropTypes from 'prop-types'; import * as React from 'react'; import { DimensionsSetProps, FlexContainerSetProps, SpacingSetProps } from './system'; import { OptionalResponsiveProp } from './system/utils/types'; /** * Style props shared between the {@link Dialog} and {@link ConfirmationDialog} components. Also accepts: * * {@link DimensionsSetProps} * * {@link FlexContainerSetProps} * * {@link SpacingSetProps} * * @noInheritDoc */ export interface DialogStyleProps extends DimensionsSetProps, FlexContainerSetProps, SpacingSetProps { /** Defines the display type of an element, which consists of the two basic qualities of how an element generates boxes — the outer display type defining how the box participates in flow layout, and the inner display type defining how the children of the box are laid out. */ display?: OptionalResponsiveProp<'block' | 'flex'>; } export declare const dialogStylePropTypes: { [x: string]: PropTypes.Validator; }; /** * Props for the {@link Dialog} component. Also accepts: * * {@link DialogStyleProps} * * @noInheritDoc * @docsPath UI/components/Dialog */ interface DialogProps extends DialogStyleProps { /** Callback function to fire when the dialog is closed. */ onClose: () => unknown; /** Extra `className`s to apply to the dialog element, separated by spaces. */ className?: string; /** Extra styles to apply to the dialog element. */ style?: React.CSSProperties; /** Extra `className`s to apply to the background element, separated by spaces. */ backgroundClassName?: string; /** Extra styles to apply to the background element. */ backgroundStyle?: React.CSSProperties; /** The contents of the dialog element. */ children: React.ReactNode; } /** * A styled modal dialog component. * * [[ Story id="dialog--example" title="Dialog example" ]] * * @docsPath UI/components/Dialog * @component */ declare class Dialog extends React.Component { /** @hidden */ static CloseButton: React.RefForwardingComponent>; /** @hidden */ static propTypes: { onClose: PropTypes.Validator<(...args: any[]) => any>; className: PropTypes.Requireable; style: PropTypes.Requireable; backgroundClassName: PropTypes.Requireable; backgroundStyle: PropTypes.Requireable; children: PropTypes.Validator>; }; /** @hidden */ static childContextTypes: { onDialogClose: PropTypes.Requireable<(...args: any[]) => any>; }; /** @hidden */ constructor(props: DialogProps); /** @hidden */ getChildContext(): { onDialogClose: () => unknown; }; /** @hidden */ componentDidMount(): void; /** @hidden */ componentWillUnmount(): void; /** @hidden */ render(): React.JSX.Element; } export default Dialog; //# sourceMappingURL=dialog.d.ts.map