From f5755af074ce3a6f471a808559a74dc7dd8a4584 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 5 Aug 2025 23:17:45 +0000 Subject: [PATCH] Create enhanced toast hook with AeThex theme variants cgen-556852a30abb47a9a704d1d910b21839 --- client/hooks/use-aethex-toast.ts | 89 ++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 client/hooks/use-aethex-toast.ts diff --git a/client/hooks/use-aethex-toast.ts b/client/hooks/use-aethex-toast.ts new file mode 100644 index 00000000..d8a38da6 --- /dev/null +++ b/client/hooks/use-aethex-toast.ts @@ -0,0 +1,89 @@ +import { toast as baseToast } from "@/components/ui/use-toast"; +import { Zap, CheckCircle, AlertTriangle, Info, Sparkles } from "lucide-react"; + +interface AethexToastOptions { + title?: string; + description?: string; + duration?: number; +} + +export const useAethexToast = () => { + const success = (options: AethexToastOptions) => { + return baseToast({ + title: ( +
+ + {options.title || "Success"} +
+ ), + description: options.description, + duration: options.duration || 5000, + variant: "success" as any, + }); + }; + + const error = (options: AethexToastOptions) => { + return baseToast({ + title: ( +
+ + {options.title || "Error"} +
+ ), + description: options.description, + duration: options.duration || 5000, + variant: "destructive", + }); + }; + + const warning = (options: AethexToastOptions) => { + return baseToast({ + title: ( +
+ + {options.title || "Warning"} +
+ ), + description: options.description, + duration: options.duration || 5000, + variant: "warning" as any, + }); + }; + + const info = (options: AethexToastOptions) => { + return baseToast({ + title: ( +
+ + {options.title || "Information"} +
+ ), + description: options.description, + duration: options.duration || 5000, + variant: "info" as any, + }); + }; + + const aethex = (options: AethexToastOptions) => { + return baseToast({ + title: ( +
+ + {options.title || "AeThex OS"} +
+ ), + description: options.description, + duration: options.duration || 6000, + variant: "aethex" as any, + }); + }; + + return { + success, + error, + warning, + info, + aethex, + toast: baseToast, // Fallback to original toast + }; +}; \ No newline at end of file