import React from 'react'; import type { ModalProps as RNModalProps, StyleProp, ViewStyle } from 'react-native'; import { type ModalContextValue } from '@coinbase/cds-common/overlays/ModalContext'; import type { SharedProps } from '@coinbase/cds-common/types/SharedProps'; import type { BoxProps } from '../../layout/Box'; type ModalChildrenRenderProps = { closeModal: () => void; }; /** * Appearance style props forwarded to the visible dialog surface (rather than the * underlying React Native Modal, which silently ignores them). */ type DialogStyleProps = Pick< BoxProps, | 'background' | 'color' | 'borderColor' | 'borderWidth' | 'borderRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius' | 'borderTopWidth' | 'borderBottomWidth' | 'borderStartWidth' | 'borderEndWidth' | 'bordered' | 'borderedTop' | 'borderedBottom' | 'borderedStart' | 'borderedEnd' | 'borderedHorizontal' | 'borderedVertical' | 'elevation' | 'padding' | 'paddingX' | 'paddingY' | 'paddingTop' | 'paddingBottom' | 'paddingStart' | 'paddingEnd' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight' >; export type ModalBaseProps = SharedProps & ModalContextValue & DialogStyleProps & Omit & { /** Component to render as the Modal content */ children?: React.ReactNode | ((props: ModalChildrenRenderProps) => React.ReactNode); /** * Callback fired after the component is closed. */ onDidClose?: () => void; /** * @danger This is a migration escape hatch. It is not intended to be used normally. * */ width?: number; zIndex?: ViewStyle['zIndex']; /** Custom styles for individual elements of the Modal */ styles?: { /** Visible modal card element */ modal?: StyleProp; /** Safe area region wrapping the modal children */ safeArea?: StyleProp; }; }; export type ModalRefBaseProps = Pick; export type ModalProps = ModalBaseProps; export declare const Modal: React.MemoExoticComponent< ({ ref, ..._props }: ModalProps & { ref?: React.Ref; }) => import('react/jsx-runtime').JSX.Element >; export {}; //# sourceMappingURL=Modal.d.ts.map