UNPKG

@zenithui/toast

Version:

A modern, lightweight toast notification system for React applications. ZenithUI Toast provides a simple and customizable way to display notifications, alerts, and messages to users with smooth animations and flexible styling options.

32 lines (31 loc) 1.5 kB
import { Toast, ToastAnimation, ToastPosition, ToastType } from "./types"; /** * The Function to reverse the toaats * @param toasts @type {Toast} * @returns */ export declare function reverseToasts(toasts: Toast[]): Toast[]; /** * * @param position @type {ToastPosition} The position of the toast. * @description Returns the position class for the toast. * @example * getPositionClass("top-right") */ export declare function getPositionClass(position: ToastPosition): "zenithui-top-left" | "zenithui-top-right" | "zenithui-bottom-left" | "zenithui-bottom-right" | "zenithui-top-center" | "zenithui-bottom-center"; /** * * @param type @type {ToastType} The type of toast. * @description Returns the theme class for the toast. * @example * getToastTheme("success") */ export declare function getToastTheme(type: ToastType): "zenithui-toast-success" | "zenithui-toast-info" | "zenithui-toast-error" | "zenithui-toast-warning"; /** * * @param animation @type {ToastAnimation} The animation of the toast. * @param position @type {ToastPosition} * @param isEnter @type {boolean} * @description Returns the animation class for the toast. */ export declare function getToastAnimation(animation: ToastAnimation, position: ToastPosition, isEnter: boolean): "zenithui-fade-in-top" | "zenithui-fade-out-top" | "zenithui-fade-in-bottom" | "zenithui-fade-out-bottom" | "zenithui-slide-in-left" | "zenithui-slide-out-left" | "zenithui-slide-in-right" | "zenithui-slide-out-right" | "" | undefined;