UNPKG

react-native-ui-lib

Version:

<p align="center"> <img src="https://user-images.githubusercontent.com/1780255/105469025-56759000-5ca0-11eb-993d-3568c1fd54f4.png" height="250px" style="display:block"/> </p> <p align="center">UI Toolset & Components Library for React Native</p> <p a

54 lines (53 loc) 1.93 kB
import React, { Component } from 'react'; import { ModalProps as RNModalProps, GestureResponderEvent } from 'react-native'; import TopBar, { ModalTopBarProps } from './TopBar'; export { ModalTopBarProps }; export interface ModalProps extends RNModalProps { /** * Blurs the modal background when transparent (iOS only) */ enableModalBlur?: boolean; /** * A custom view to use as a BlueView instead of the default one */ blurView?: JSX.Element; /** * allow dismissing a modal when clicking on its background */ onBackgroundPress?: (event: GestureResponderEvent) => void; /** * the background color of the overlay */ overlayBackgroundColor?: string; /** * The modal's end-to-end test identifier */ testID?: string; /** * Overrides the text that's read by the screen reader when the user interacts with the element. By default, the * label is constructed by traversing all the children and accumulating all the Text nodes separated by space. */ accessibilityLabel?: string; /** * Should add a GestureHandlerRootView (Android only) */ useGestureHandlerRootView?: boolean; } /** * @description: Component that present content on top of the invoking screen * @extends: Modal * @extendsLink: https://reactnative.dev/docs/modal * @gif: https://media.giphy.com/media/3oFzmfSX8KgvctI4Ks/giphy.gif * @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ModalScreen.tsx */ declare class Modal extends Component<ModalProps> { static displayName: string; static TopBar: typeof TopBar; constructor(props: ModalProps); renderTouchableOverlay(): JSX.Element | undefined; render(): JSX.Element; } declare const _default: React.ComponentClass<ModalProps & { useCustomTheme?: boolean | undefined; }, any> & typeof Modal; export default _default;