@@ -12,7 +12,7 @@ import {
12
12
} from "lucide-react" ;
13
13
import { ReactNode } from "react" ;
14
14
15
- const BentoCard = ( {
15
+ function BentoCard ( {
16
16
title,
17
17
icon,
18
18
description,
@@ -26,7 +26,7 @@ const BentoCard = ({
26
26
gradient ?: string ;
27
27
description : ReactNode ;
28
28
className ?: string ;
29
- } ) => {
29
+ } ) {
30
30
return (
31
31
< MovingGradient
32
32
animated = { false }
@@ -40,79 +40,102 @@ const BentoCard = ({
40
40
< p className = "text-md line-clamp-1 font-bold" > { title } </ p >
41
41
</ div >
42
42
</ header >
43
- < div className = "flex-1 text-sm font-bold" > { description } </ div >
43
+ < div className = "flex-1 text-sm font-medium text-opacity-80" >
44
+ { description }
45
+ </ div >
44
46
{ children }
45
47
</ section >
46
48
</ MovingGradient >
47
49
) ;
48
- } ;
50
+ }
49
51
50
- export default function Gradient ( ) {
52
+ function GetGradient ( ) {
51
53
return (
52
- < div className = "rounded-md bg-zinc-950 p-4" >
53
- < div className = "grid grid-cols-1 gap-4 sm:grid-cols-3 lg:grid-cols-3" >
54
- < BentoCard
55
- title = "Gradient"
56
- icon = { < BarChart size = { 24 } /> }
57
- description = {
58
- < span >
59
- A gradient is a smooth transition from one color to another.
60
- </ span >
61
- }
62
- className = "sm:col-span-1 sm:row-span-2"
63
- gradient = "from-cyan-900 via-60% via-sky-600 to-indigo-600"
64
- >
65
- < div className = "group relative flex cursor-pointer flex-col justify-end rounded-md bg-zinc-950 p-2 text-2xl tracking-tight text-gray-100 md:text-4xl" >
66
- < div className = "font-light" > Get</ div >
67
- < div className = "-mt-2 font-bold" > Gradients</ div >
68
- < div className = "flex h-6 w-6 items-center justify-center rounded-full border bg-white transition-all duration-700 group-hover:rotate-[360deg] md:h-8 md:w-8" >
69
- < ArrowRight size = { 16 } className = "text-blue-600" />
70
- </ div >
71
- < div className = "absolute right-2 top-2 h-2 w-2 rounded-full bg-white opacity-50 transition-all duration-700 group-hover:opacity-25" />
72
- </ div >
73
- </ BentoCard >
74
-
75
- < BentoCard
76
- title = "Linear Gradient"
77
- icon = { < GitBranch size = { 24 } /> }
78
- description = "A linear gradient is a gradient that goes in a straight line."
79
- gradient = "from-red-300 via-60% via-rose-300 to-red-200"
80
- className = "group sm:col-span-1"
81
- >
82
- < div className = "h-4 w-full rounded-sm bg-gray-100 group-hover:animate-pulse group-hover:bg-gray-300" />
83
- < div className = "h-4 w-1/2 rounded-sm bg-gray-100 group-hover:animate-pulse group-hover:bg-gray-300" />
84
- </ BentoCard >
54
+ < BentoCard
55
+ title = "Gradient"
56
+ icon = { < BarChart size = { 24 } /> }
57
+ description = {
58
+ < span >
59
+ A gradient is a smooth transition from one color to another.
60
+ </ span >
61
+ }
62
+ className = "sm:col-span-1 sm:row-span-2"
63
+ gradient = "from-cyan-900 via-60% via-sky-600 to-indigo-600"
64
+ >
65
+ < div className = "group relative flex cursor-pointer flex-col justify-end rounded-md bg-zinc-950 p-2 text-2xl tracking-tight text-gray-100 md:text-4xl" >
66
+ < div className = "font-light" > Get</ div >
67
+ < div className = "-mt-2 font-bold" > Gradients</ div >
68
+ < div className = "flex h-6 w-6 items-center justify-center rounded-full border bg-white transition-all duration-700 group-hover:rotate-[360deg] md:h-8 md:w-8" >
69
+ < ArrowRight size = { 16 } className = "text-blue-600" />
70
+ </ div >
71
+ < div className = "absolute right-2 top-2 h-2 w-2 rounded-full bg-white opacity-50 transition-all duration-700 group-hover:opacity-25" />
72
+ </ div >
73
+ </ BentoCard >
74
+ ) ;
75
+ }
85
76
86
- < BentoCard
87
- title = "Radial Gradient"
88
- icon = { < LineChart size = { 24 } /> }
89
- description = "A radial gradient is a gradient that goes in a circular direction."
90
- gradient = "from-lime-300 via-60% via-green-200 to-lime-200"
91
- className = "group sm:col-span-1"
92
- >
93
- < div className = "flex w-full flex-row justify-end gap-2 rounded border-yellow-200 bg-yellow-100 p-2" >
94
- < HeartPulse
95
- size = { 16 }
96
- className = "delay-150 duration-75 group-hover:animate-in group-hover:slide-in-from-right-full"
97
- />
98
- < Sun
99
- size = { 16 }
100
- className = "delay-75 duration-75 group-hover:animate-in group-hover:slide-in-from-right-full"
101
- />
102
- < BookPlus
103
- size = { 16 }
104
- className = "duration-75 group-hover:animate-in group-hover:slide-in-from-right-full"
105
- />
106
- </ div >
107
- </ BentoCard >
77
+ function LinearGradient ( ) {
78
+ return (
79
+ < BentoCard
80
+ title = "Linear Gradient"
81
+ icon = { < GitBranch size = { 24 } /> }
82
+ description = "A linear gradient is a gradient that goes in a straight line."
83
+ gradient = "from-red-300 via-60% via-rose-300 to-red-200"
84
+ className = "group sm:col-span-1"
85
+ >
86
+ < div className = "h-4 w-full rounded-sm bg-gray-100 group-hover:animate-pulse group-hover:bg-gray-300" />
87
+ < div className = "h-4 w-1/2 rounded-sm bg-gray-100 group-hover:animate-pulse group-hover:bg-gray-300" />
88
+ </ BentoCard >
89
+ ) ;
90
+ }
108
91
109
- < BentoCard
110
- title = "Conic Gradient"
111
- icon = { < TypeIcon size = { 24 } /> }
112
- description = "A conic gradient is a gradient that goes in a circular direction."
113
- gradient = "from-cyan-900 via-60% via-sky-600 to-indigo-600"
114
- className = "sm:col-span-2"
92
+ function RadialGradient ( ) {
93
+ return (
94
+ < BentoCard
95
+ title = "Radial Gradient"
96
+ icon = { < LineChart size = { 24 } /> }
97
+ description = "A radial gradient is a gradient that goes in a circular direction."
98
+ gradient = "from-lime-300 via-60% via-green-200 to-lime-200"
99
+ className = "group sm:col-span-1"
100
+ >
101
+ < div className = "flex w-full flex-row justify-end gap-2 rounded border-yellow-200 bg-yellow-100 p-2" >
102
+ < HeartPulse
103
+ size = { 16 }
104
+ className = "delay-150 duration-75 group-hover:animate-in group-hover:slide-in-from-right-full"
105
+ />
106
+ < Sun
107
+ size = { 16 }
108
+ className = "delay-75 duration-75 group-hover:animate-in group-hover:slide-in-from-right-full"
115
109
/>
110
+ < BookPlus
111
+ size = { 16 }
112
+ className = "duration-75 group-hover:animate-in group-hover:slide-in-from-right-full"
113
+ />
114
+ </ div >
115
+ </ BentoCard >
116
+ ) ;
117
+ }
118
+
119
+ function ConicGradient ( ) {
120
+ return (
121
+ < BentoCard
122
+ title = "Conic Gradient"
123
+ icon = { < TypeIcon size = { 24 } /> }
124
+ description = "A conic gradient is a gradient that goes in a circular direction."
125
+ gradient = "from-cyan-900 via-60% via-sky-600 to-indigo-600"
126
+ className = "sm:col-span-2"
127
+ />
128
+ ) ;
129
+ }
130
+
131
+ export default function Gradient ( ) {
132
+ return (
133
+ < div className = "bg-zinc-950 p-4" >
134
+ < div className = "grid grid-cols-1 gap-4 text-black sm:grid-cols-3 lg:grid-cols-3" >
135
+ < GetGradient />
136
+ < LinearGradient />
137
+ < RadialGradient />
138
+ < ConicGradient />
116
139
</ div >
117
140
</ div >
118
141
) ;
0 commit comments