UNPKG

react-native-use-modal-hooks

Version:

React hooks for displaying a modal window in React Native

19 lines (18 loc) 484 B
import * as React from "react"; /** * Modals are represented as react components * * This is what gets passed to useModal as the first argument. */ export declare type ModalType = React.FunctionComponent<any>; /** * The shape of the modal context */ export interface ModalContextType { showModal(key: string, component: ModalType): void; hideModal(key: string): void; } /** * Modal Context Object */ export declare const ModalContext: React.Context<ModalContextType>;