react-native-toastify-pro
Version:
A customizable toast notification component for React Native, designed to work seamlessly on both Android and iOS platforms and allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!
18 lines (17 loc) • 504 B
TypeScript
import React, { ReactNode } from "react";
export interface ToastOptions {
message: string;
duration?: number;
position?: "top" | "bottom" | "center";
type?: "info" | "success" | "error";
backgroundColor?: string;
textColor?: string;
positionOffset: number;
}
export interface ToastContextType {
showToast: (options: ToastOptions) => void;
}
export declare const ToastProvider: React.FC<{
children: ReactNode;
}>;
export declare const useToast: () => ToastContextType;