@amitsolanki1409/react-native-toast-message
Version:
A customizable and lightweight toast component for React Native.
23 lines (22 loc) • 654 B
TypeScript
import React, { ReactNode } from "react";
import { ColorValue, TextStyle, ViewStyle } from "react-native";
type ToastOptions = {
title?: string;
message: string;
type?: "success" | "error" | "info" | "warning";
position?: "top" | "center" | "bottom";
duration?: number;
onClose?: () => void;
Icon?: ReactNode;
titleStyle?: TextStyle;
messageStyle?: TextStyle;
containerStyle?: ViewStyle;
alertColor?: ColorValue;
};
declare class Toast {
private static setToast;
static show(options: ToastOptions): void;
static hide(): void;
static ToastContainer(): React.JSX.Element;
}
export default Toast;