| 1 |
/// <reference types="react" /> |
| 2 |
import { OUIAProps } from '../../helpers'; |
| 3 |
export interface ModalContentProps extends OUIAProps { |
| 4 |
/** Id to use for the modal box description. This should match the ModalHeader labelId or descriptorId. */ |
| 5 |
'aria-describedby'?: string; |
| 6 |
/** Accessible descriptor of the modal. */ |
| 7 |
'aria-label'?: string; |
| 8 |
/** Id to use for the modal box label. This should include the ModalHeader labelId. */ |
| 9 |
'aria-labelledby'?: string; |
| 10 |
/** Id of the modal box container. */ |
| 11 |
boxId: string; |
| 12 |
/** Id of the backdrop. */ |
| 13 |
backdropId?: string; |
| 14 |
/** Content rendered inside the modal. */ |
| 15 |
children: React.ReactNode; |
| 16 |
/** Additional classes added to the modal box. */ |
| 17 |
className?: string; |
| 18 |
/** Additional classes added to the modal backdrop. */ |
| 19 |
backdropClassName?: string; |
| 20 |
/** Flag to disable focus trap. */ |
| 21 |
disableFocusTrap?: boolean; |
| 22 |
/** The element to focus when the modal opens. By default the first |
| 23 |
* focusable element will receive focus. |
| 24 |
*/ |
| 25 |
elementToFocus?: HTMLElement | SVGElement | string; |
| 26 |
/** Id of the focus trap */ |
| 27 |
focusTrapId?: string; |
| 28 |
/** Flag to show the modal. */ |
| 29 |
isOpen?: boolean; |
| 30 |
/** A callback for when the close button is clicked. */ |
| 31 |
onClose?: (event: KeyboardEvent | React.MouseEvent) => void; |
| 32 |
/** Position of the modal. By default a modal will be positioned vertically and horizontally centered. */ |
| 33 |
position?: 'default' | 'top'; |
| 34 |
/** Offset from alternate position. Can be any valid CSS length/percentage. */ |
| 35 |
positionOffset?: string; |
| 36 |
/** Variant of the modal. */ |
| 37 |
variant?: 'small' | 'medium' | 'large' | 'default'; |
| 38 |
/** Default width of the modal. */ |
| 39 |
width?: number | string; |
| 40 |
/** Maximum width of the modal. */ |
| 41 |
maxWidth?: number | string; |
| 42 |
/** Value to overwrite the randomly generated data-ouia-component-id.*/ |
| 43 |
ouiaId?: number | string; |
| 44 |
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */ |
| 45 |
ouiaSafe?: boolean; |
| 46 |
} |
| 47 |
export declare const ModalContent: React.FunctionComponent<ModalContentProps>; |
| 48 |
//# sourceMappingURL=ModalContent.d.ts.map |