UNPKG

react-native-styled-toast

Version:

A theme friendly, easy to use react-native toast component built using styled-components and styled-system.

15 lines (14 loc) 582 B
import * as React from 'react'; import { ToastConfig } from '../Toast'; import { ToastInternalConfig } from '../Toast/index'; declare type ToastContextType = { toast: (options: ToastConfig) => void; position?: 'TOP' | 'BOTTOM'; offset?: number; maxToasts?: number; }; export declare const ToastContext: React.Context<ToastContextType>; export declare const useToast: () => ToastContextType; export declare type FullToastConfig = ToastConfig & ToastInternalConfig; declare const ToastProvider: React.FC<Omit<ToastContextType, 'toast'>>; export default ToastProvider;