aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
42 lines • 1.52 kB
TypeScript
import React from "react";
export type ToastType = "success" | "error" | "warning" | "info";
export interface Toast {
id: string;
type: ToastType;
title: string;
message?: string;
duration?: number;
action?: {
label: string;
onClick: () => void;
};
dismissible?: boolean;
}
interface ToastContextType {
toasts: Toast[];
addToast: (toast: Omit<Toast, "id">) => void;
removeToast: (id: string) => void;
clearAllToasts: () => void;
}
export declare const useToast: () => ToastContextType;
interface ToastProviderProps {
children: React.ReactNode;
maxToasts?: number;
position?: "top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center" | "bottom-center";
}
export declare const ToastProvider: React.FC<ToastProviderProps>;
export declare const useToastHelpers: () => {
success: (title: string, message?: string, options?: Partial<Toast>) => void;
error: (title: string, message?: string, options?: Partial<Toast>) => void;
warning: (title: string, message?: string, options?: Partial<Toast>) => void;
info: (title: string, message?: string, options?: Partial<Toast>) => void;
};
export interface GlassToastProps extends React.HTMLAttributes<HTMLDivElement> {
maxToasts?: number;
position?: ToastProviderProps["position"];
autoDemo?: boolean;
children?: React.ReactNode;
}
export declare const GlassToast: React.FC<GlassToastProps>;
export default GlassToast;
//# sourceMappingURL=GlassToast.d.ts.map