UNPKG

react-native-global-modal-2

Version:

🌍 Global modal and callable from anywhere on the app for React Native

20 lines (19 loc) 651 B
import React from "react"; import { StyleProp, ViewStyle } from "react-native"; import { ModalProps } from "react-native-modal"; export interface ModalData { content: any; onShow?: () => void; onHide?: () => void; isFullScreen?: boolean; containerStyle?: StyleProp<ViewStyle>; } export interface GlobalModalProps extends Partial<ModalProps> { defaultStyle?: StyleProp<ViewStyle>; } export declare type GlobalModalRef = { show: (data: ModalData) => void; hide: () => void; }; declare const GlobalModal: React.ForwardRefExoticComponent<GlobalModalProps & React.RefAttributes<GlobalModalRef>>; export default GlobalModal;