import React from 'react'; import { type ModalContextValue } from '@coinbase/cds-common/overlays/ModalContext'; import type { PositionStyles, SharedProps } from '@coinbase/cds-common/types'; import type { Position } from '@coinbase/cds-common/types/Position'; import { type FocusTrapProps } from '../FocusTrap'; import type { ModalWrapperProps } from './ModalWrapper'; type ModalChildrenRenderProps = { closeModal: () => void; }; export type ModalBaseProps = SharedProps & ModalContextValue & Pick & Omit & Pick< FocusTrapProps, 'disableFocusTrap' | 'focusTabIndexElements' | 'disableArrowKeyNavigation' > & { /** Component to render as the Modal content */ children?: React.ReactNode | React.FC; /** * Callback fired after the component is closed. */ onDidClose?: () => void; /** * If pressing the esc key should close the modal * @default true */ shouldCloseOnEscPress?: boolean; /** * Set the position for the modal dialogue * @danger This is a migration escape hatch. It is not intended to be used normally. */ dangerouslySetPosition?: Position; /** * If `true`, the focus trap will restore focus to the previously focused element when it unmounts. * * WARNING: If you disable this, you need to ensure that focus is restored properly so it doesn't end up on the body * @default true */ restoreFocusOnUnmount?: boolean; }; export type ModalProps = ModalBaseProps; export type ModalRefBaseProps = Pick; export declare const Modal: React.MemoExoticComponent< React.ForwardRefExoticComponent< Omit & React.RefAttributes > >; export {}; //# sourceMappingURL=Modal.d.ts.map