expo-toastee
Version:
A simple and elegant toast notification library for React Native Expo with Material You and Neobrutalist themes
42 lines (41 loc) • 1.25 kB
TypeScript
import { ToastOptions } from './types';
/**
* Toast utility functions that can be used anywhere in your app
* These functions are NOT React hooks and can be called from components,
* utility functions, services, etc.
*/
export declare const toast: {
/**
* Show a success toast
* @param message - The message to display
* @param options - Optional configuration
*/
success: (message: string, options?: ToastOptions) => void;
/**
* Show an error toast
* @param message - The message to display
* @param options - Optional configuration
*/
error: (message: string, options?: ToastOptions) => void;
/**
* Show an info toast
* @param message - The message to display
* @param options - Optional configuration
*/
info: (message: string, options?: ToastOptions) => void;
/**
* Show a warning toast
* @param message - The message to display
* @param options - Optional configuration
*/
warning: (message: string, options?: ToastOptions) => void;
/**
* Remove a specific toast by ID
* @param id - The toast ID to remove
*/
remove: (id: string) => void;
/**
* Clear all toasts
*/
clear: () => void;
};