aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
64 lines • 2.63 kB
TypeScript
import React from "react";
export type NotificationType = "success" | "error" | "warning" | "info";
export interface GlassNotification {
id: string;
type: NotificationType;
title: string;
message?: string;
duration?: number;
action?: {
label: string;
onClick: () => void;
};
persistent?: boolean;
}
export interface GlassNotificationCenterProps extends React.HTMLAttributes<HTMLDivElement> {
/** Position of the notification center */
position?: "top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center" | "bottom-center";
/** Maximum number of notifications to show */
maxNotifications?: number;
/** Auto-hide delay for non-persistent notifications (ms) */
autoHideDelay?: number;
/** Animation preset for notifications */
animation?: "slide" | "fade" | "scale" | "bounce";
/** Whether to show clear all button */
showClearAll?: boolean;
}
interface NotificationContextType {
notifications: GlassNotification[];
addNotification: (notification: Omit<GlassNotification, "id">) => void;
removeNotification: (id: string) => void;
clearAll: () => void;
}
export declare const useNotifications: () => NotificationContextType;
export declare const GlassNotificationProvider: React.FC<{
children: React.ReactNode;
}>;
/**
* GlassNotificationCenter component
* A notification center with glassmorphism styling for managing toast notifications
*/
export declare const GlassNotificationCenter: React.ForwardRefExoticComponent<GlassNotificationCenterProps & React.RefAttributes<HTMLDivElement>>;
/**
* Helper component for creating individual notifications
*/
export interface GlassNotificationItemProps extends React.HTMLAttributes<HTMLDivElement> {
notification: GlassNotification;
onClose: () => void;
}
export declare const GlassNotificationItem: React.ForwardRefExoticComponent<GlassNotificationItemProps & React.RefAttributes<HTMLDivElement>>;
/**
* Utility hooks and helpers for notifications
*/
export declare const useNotificationCenter: () => {
notify: {
success: (title: string, message?: string, options?: Partial<GlassNotification>) => void;
error: (title: string, message?: string, options?: Partial<GlassNotification>) => void;
warning: (title: string, message?: string, options?: Partial<GlassNotification>) => void;
info: (title: string, message?: string, options?: Partial<GlassNotification>) => void;
};
removeNotification: (id: string) => void;
clearAll: () => void;
};
export {};
//# sourceMappingURL=GlassNotificationCenter.d.ts.map