UNPKG

@prosperitainova/dumbo-react-native

Version:
36 lines 1.39 kB
import React from 'react'; import { GestureResponderEvent } from 'react-native'; /** Props for Modal component */ export type ModalProps = { /** Title to show */ title: string; /** Body to show */ description?: string; /** Items to render */ children?: React.ReactNode; /** Primary button action (will not render if function and text not set) */ primaryActionOnPress?: (event: GestureResponderEvent) => void; /** Primary text for action */ primaryActionText?: string; /** Secondary button action (will not render if function and text not set) */ secondaryActionOnPress?: (event: GestureResponderEvent) => void; /** Secondary text for action */ secondaryActionText?: string; /** Indicate if should open */ open: boolean; }; /** * Modal component for showing a center modal (overlay) with info and call to actions * * Multiple React Modals are not currently supported in React Native. * However, you can open a modal from within a modal. Just not side by side. * * {@link https://github.com/carbon-design-system/carbon-react-native/blob/main/example/src/Views/Modal.tsx | Example code} */ export declare class Modal extends React.Component<ModalProps> { private get styles(); private getPrimaryStateStyle; private getSecondaryStateStyle; render(): React.ReactNode; } //# sourceMappingURL=index.d.ts.map