|
1 | 1 | "use client"; |
| 2 | +import { Button as BaseButton } from "@heroui/react"; |
| 3 | +import { extendVariants } from "@heroui/react"; |
2 | 4 |
|
3 | | -import {Button as BaseButton} from "@heroui/button"; |
4 | | -import {extendVariants} from "@heroui/system"; |
5 | | - |
6 | | -// BrandButton adds a warm orange glow and a glassy variant tailored for the orange background |
7 | 5 | export const BrandButton = extendVariants(BaseButton, { |
8 | 6 | variants: { |
9 | 7 | variant: { |
10 | | - glow: [ |
11 | | - "relative", |
12 | | - "text-black", |
13 | | - "bg-gradient-to-r from-primary to-secondary", |
14 | | - "ring-2 ring-primary/40", |
15 | | - "shadow-[0_0_24px_rgba(45,212,191,0.55)]", |
16 | | - "before:absolute before:inset-0 before:-z-10 before:rounded-inherit", |
17 | | - "before:bg-[radial-gradient(120%_80%_at_50%_0%,rgba(45,212,191,0.35),transparent_70%)]", |
18 | | - "hover:brightness-110", |
19 | | - ].join(" "), |
20 | | - glass: [ |
21 | | - "relative", |
22 | | - "text-white", |
23 | | - "bg-black/30", |
24 | | - "backdrop-blur-lg backdrop-saturate-150", |
25 | | - "border border-white/25", |
26 | | - "shadow-none", |
27 | | - "hover:bg-black/35 hover:border-white/40", |
28 | | - // top highlight |
29 | | - "before:absolute before:inset-0 before:rounded-inherit before:pointer-events-none", |
30 | | - "before:bg-gradient-to-b before:from-white/15 before:to-transparent", |
31 | | - ].join(" "), |
| 8 | + glow: "relative rounded-lg bg-gradient-to-r from-[#fb923c] to-[#f97316] ring-2 ring-[#fb923c]/40 shadow-[0_0_28px_rgba(251,146,60,0.5)] before:absolute before:inset-0 before:-z-10 before:rounded-lg before:rounded-inherit before:bg-[radial-gradient(120%_80%_at_50%_0%,rgba(251,146,60,0.3),transparent_70%)] hover:shadow-[0_0_40px_rgba(251,146,60,0.7)] hover:ring-[#fb923c]/60 hover:brightness-110 transition-all duration-300 ease-out", |
| 9 | + glass: "relative rounded-lg bg-black/30 backdrop-blur-xl backdrop-saturate-150 border border-white/20 shadow-[0_0_20px_rgba(251,146,60,0.25)] hover:bg-black/35 hover:border-white/35 hover:shadow-[0_0_32px_rgba(251,146,60,0.4)] before:absolute before:inset-0 before:rounded-lg before:rounded-inherit before:pointer-events-none before:bg-gradient-to-b before:from-white/10 before:to-transparent transition-all duration-300 ease-out", |
32 | 10 | }, |
33 | 11 | color: { |
34 | | - flame: |
35 | | - "bg-gradient-to-r from-teal-400 to-blue-400 text-black hover:from-teal-300 hover:to-blue-300", |
| 12 | + orange: "", |
| 13 | + }, |
| 14 | + size: { |
| 15 | + sm: "h-8 px-3 text-xs", |
| 16 | + md: "h-10 px-4 text-sm", |
| 17 | + lg: "h-12 px-6 text-base", |
| 18 | + }, |
| 19 | + radius: { |
| 20 | + sm: "rounded-md", |
| 21 | + md: "rounded-lg", |
| 22 | + lg: "rounded-xl", |
36 | 23 | }, |
37 | 24 | }, |
38 | 25 | defaultVariants: { |
39 | | - color: "flame", |
| 26 | + variant: "shadow", |
| 27 | + color: "primary", |
| 28 | + size: "md", |
| 29 | + radius: "md", |
40 | 30 | }, |
41 | | - compoundVariants: [ |
42 | | - { |
43 | | - variant: "glow", |
44 | | - class: "ring-1 ring-primary/20", |
45 | | - }, |
46 | | - ], |
47 | 31 | }); |
48 | 32 |
|
49 | 33 | export type BrandButtonProps = React.ComponentProps<typeof BrandButton>; |
| 34 | + |
0 commit comments