UNPKG

@cbinsights/fds

Version:
40 lines (39 loc) 1.7 kB
import React from 'react'; export declare const isElementOverflowing: ({ current, }: React.MutableRefObject<HTMLDivElement | null>) => boolean; export interface DialogProps { /** Controls the role of the modal */ role?: 'dialog' | 'alertdialog'; /** Controls whether the modal (and overlay) are shown or not */ isOpen?: boolean; /** Add into bottom portion of modal */ footerContent?: React.ReactNode | string; /** Add into content (middle) portion of modal */ content?: React.ReactNode | string; /** Controls text displayed in modal header */ title?: string; /** * Callback that user can pass in, to be conditionally fired when * user attempts to close modal. When defined, the modal close button appears */ onDismiss?: () => void; /** Custom modal width */ width?: string; /** Custom modal height */ height?: string; /** * Border between content area and footer currently renders only if there is scrollable content. Set this boolean * so that the border always renders no matter what. */ alwaysShowBorder?: boolean; /** * Disables the focus trap on the Dialog. * Useful when the Dialog contains components that manage focus (e.g. `Menu`) */ disableFocusTrap?: boolean; /** Disables rendering the dialog in a portal, and renders it locally instead. */ disablePortal?: boolean; /** Add content below the title */ subTitle?: React.ReactNode; } declare const Dialog: ({ role, width, height, onDismiss, alwaysShowBorder, isOpen, title, content, footerContent, subTitle, disablePortal, disableFocusTrap, }: DialogProps) => JSX.Element; export default Dialog;