1
+ /* eslint-disable react/no-unescaped-entities */
2
+ "use client" ;
3
+
4
+ import { Alert } from "@/components/ui/alert" ;
5
+ import { cn } from "@/lib/utils" ;
6
+ import { motion } from "framer-motion" ;
7
+ import { PartyPopper } from "lucide-react" ;
8
+
9
+ interface Alert04Props {
10
+ className ?: string ;
11
+ }
12
+
13
+ export default function Alertdemo ( { className } : Alert04Props ) {
14
+ return (
15
+ < motion . div
16
+ initial = { { opacity : 0 , y : - 8 } }
17
+ animate = { { opacity : 1 , y : 0 } }
18
+ className = { cn ( "w-full max-w-xl mx-auto" , className ) }
19
+ >
20
+ < Alert className = { cn (
21
+ "relative overflow-hidden" ,
22
+ "bg-gradient-to-b from-violet-50 to-white" ,
23
+ "dark:from-violet-950/20 dark:to-zinc-950" ,
24
+ "border border-violet-100 dark:border-violet-900/50" ,
25
+ "shadow-[0_1px_6px_0_rgba(139,92,246,0.06)]" ,
26
+ "rounded-xl p-4" ,
27
+ className
28
+ ) } >
29
+ < div className = "flex items-center gap-4" >
30
+ < motion . div
31
+ initial = { { rotate : - 15 , scale : 0.5 } }
32
+ animate = { { rotate : 0 , scale : 1 } }
33
+ transition = { {
34
+ type : "spring" ,
35
+ stiffness : 300 ,
36
+ damping : 20
37
+ } }
38
+ >
39
+ < div className = { cn (
40
+ "p-2.5 rounded-xl" ,
41
+ "bg-gradient-to-br from-fuchsia-500 via-violet-500 to-indigo-500" ,
42
+ "dark:from-fuchsia-600 dark:via-violet-600 dark:to-indigo-600" ,
43
+ ) } >
44
+ < PartyPopper className = "h-5 w-5 text-white" />
45
+ </ div >
46
+ </ motion . div >
47
+
48
+ < div className = "space-y-1" >
49
+ < motion . h3
50
+ initial = { { opacity : 0 , x : 20 } }
51
+ animate = { { opacity : 1 , x : 0 } }
52
+ transition = { { delay : 0.1 } }
53
+ className = { cn (
54
+ "font-medium" ,
55
+ "text-violet-900 dark:text-violet-100"
56
+ ) }
57
+ >
58
+ Amazing milestone! 🎉
59
+ </ motion . h3 >
60
+ < motion . p
61
+ initial = { { opacity : 0 , x : 20 } }
62
+ animate = { { opacity : 1 , x : 0 } }
63
+ transition = { { delay : 0.2 } }
64
+ className = { cn (
65
+ "text-sm" ,
66
+ "text-violet-600 dark:text-violet-300"
67
+ ) }
68
+ >
69
+ You've just hit 1,000 followers on your journey!
70
+ </ motion . p >
71
+ </ div >
72
+ </ div >
73
+
74
+ { /* Confetti effect */ }
75
+ < div className = "absolute inset-0 pointer-events-none" >
76
+ < div className = "absolute -left-2 -top-2 h-16 w-16 rounded-full bg-fuchsia-400 dark:bg-fuchsia-600/30 blur-2xl opacity-20" />
77
+ < div className = "absolute top-2 right-8 h-12 w-12 rounded-full bg-violet-400 dark:bg-violet-600/30 blur-2xl opacity-20" />
78
+ < div className = "absolute -right-2 -bottom-2 h-16 w-16 rounded-full bg-indigo-400 dark:bg-indigo-600/30 blur-2xl opacity-20" />
79
+ </ div >
80
+
81
+ { /* Celebration badge */ }
82
+ < div className = "absolute top-4 right-4" >
83
+ < motion . div
84
+ initial = { { scale : 0 } }
85
+ animate = { { scale : 1 } }
86
+ transition = { {
87
+ type : "spring" ,
88
+ stiffness : 300 ,
89
+ damping : 20 ,
90
+ delay : 0.3
91
+ } }
92
+ className = { cn (
93
+ "text-[11px] font-medium" ,
94
+ "px-2.5 py-0.5 rounded-full" ,
95
+ "bg-gradient-to-r from-fuchsia-500/10 via-violet-500/10 to-indigo-500/10" ,
96
+ "dark:from-fuchsia-500/20 dark:via-violet-500/20 dark:to-indigo-500/20" ,
97
+ "text-violet-700 dark:text-violet-200" ,
98
+ "ring-1 ring-violet-500/20 dark:ring-violet-400/20"
99
+ ) }
100
+ >
101
+ Milestone
102
+ </ motion . div >
103
+ </ div >
104
+ </ Alert >
105
+ </ motion . div >
106
+ ) ;
107
+ }
0 commit comments