|
1 | | -import { cva, type VariantProps } from "class-variance-authority"; |
| 1 | +import { cva, type VariantProps } from 'class-variance-authority'; |
2 | 2 |
|
3 | 3 | export const brandButtonVariants = cva( |
4 | | - "group text-center font-semibold leading-none relative z-0 flex flex-row items-center justify-center border-2 border-solid shadow-none cursor-pointer rounded-md hover:shadow-md focus:shadow-md disabled:opacity-25 disabled:hover:opacity-25 disabled:focus:opacity-25 disabled:cursor-not-allowed", |
| 4 | + 'group text-center font-semibold leading-none relative z-0 flex flex-row items-center justify-center border-2 border-solid shadow-none cursor-pointer rounded-md hover:shadow-md focus:shadow-md disabled:opacity-25 disabled:hover:opacity-25 disabled:focus:opacity-25 disabled:cursor-not-allowed', |
5 | 5 | { |
6 | 6 | variants: { |
7 | 7 | variant: { |
8 | | - fill: "[&]:text-white bg-transparent border-transparent", |
9 | | - black: "[&]:text-white bg-black border-black transition hover:text-black focus:text-black hover:bg-grey focus:bg-grey hover:border-grey focus:border-grey", |
10 | | - gray: "text-black bg-grey transition hover:text-white focus:text-white hover:bg-grey-mid focus:bg-grey-mid hover:border-grey-mid focus:border-grey-mid", |
11 | | - outline: "[&]:text-orange bg-transparent border-orange hover:text-white focus:text-white", |
12 | | - "outline-primary": "text-primary [&]:text-primary uppercase tracking-widest bg-transparent border-primary rounded-sm hover:text-white focus:text-white", |
13 | | - "outline-black": "text-black bg-transparent border-black hover:text-black focus:text-black hover:bg-grey focus:bg-grey hover:border-grey focus:border-grey", |
14 | | - "outline-white": "text-white bg-transparent border-white hover:text-black focus:text-black hover:bg-white focus:bg-white", |
15 | | - underline: "opacity-75 underline border-transparent transition hover:text-primary hover:bg-muted hover:border-muted focus:text-primary focus:bg-muted focus:border-muted hover:opacity-100 focus:opacity-100", |
16 | | - "underline-hover-red": "opacity-75 underline border-transparent transition hover:text-white hover:bg-unraid-red hover:border-unraid-red focus:text-white focus:bg-unraid-red focus:border-unraid-red hover:opacity-100 focus:opacity-100", |
17 | | - white: "text-black bg-white transition hover:bg-grey focus:bg-grey", |
18 | | - none: "", |
| 8 | + fill: '[&]:text-white bg-transparent border-transparent', |
| 9 | + black: |
| 10 | + '[&]:text-white bg-black border-black transition hover:text-black focus:text-black hover:bg-grey focus:bg-grey hover:border-grey focus:border-grey', |
| 11 | + gray: 'text-black bg-grey transition hover:text-white focus:text-white hover:bg-grey-mid focus:bg-grey-mid hover:border-grey-mid focus:border-grey-mid', |
| 12 | + outline: '[&]:text-orange bg-transparent border-orange hover:text-white focus:text-white', |
| 13 | + 'outline-primary': |
| 14 | + 'text-primary [&]:text-primary uppercase tracking-widest bg-transparent border-primary rounded-sm hover:text-white focus:text-white', |
| 15 | + 'outline-black': |
| 16 | + 'text-black bg-transparent border-black hover:text-black focus:text-black hover:bg-grey focus:bg-grey hover:border-grey focus:border-grey', |
| 17 | + 'outline-white': |
| 18 | + 'text-white bg-transparent border-white hover:text-black focus:text-black hover:bg-white focus:bg-white', |
| 19 | + underline: |
| 20 | + 'opacity-75 underline border-transparent transition hover:text-primary hover:bg-muted hover:border-muted focus:text-primary focus:bg-muted focus:border-muted hover:opacity-100 focus:opacity-100', |
| 21 | + 'underline-hover-red': |
| 22 | + 'opacity-75 underline border-transparent transition hover:text-white hover:bg-unraid-red hover:border-unraid-red focus:text-white focus:bg-unraid-red focus:border-unraid-red hover:opacity-100 focus:opacity-100', |
| 23 | + white: 'text-black bg-white transition hover:bg-grey focus:bg-grey', |
| 24 | + none: '', |
19 | 25 | }, |
20 | 26 | size: { |
21 | | - "12px": "text-12px gap-4px", |
22 | | - "14px": "text-14px gap-8px", |
23 | | - "16px": "text-16px gap-8px", |
24 | | - "18px": "text-18px gap-8px", |
25 | | - "20px": "text-20px gap-8px", |
26 | | - "24px": "text-24px gap-8px", |
| 27 | + '12px': 'text-xs gap-1', |
| 28 | + '14px': 'text-sm gap-2', |
| 29 | + '16px': 'text-base gap-2', |
| 30 | + '18px': 'text-lg gap-2', |
| 31 | + '20px': 'text-xl gap-2', |
| 32 | + '24px': 'text-2xl gap-2', |
27 | 33 | }, |
28 | 34 | padding: { |
29 | | - default: "", |
30 | | - none: "p-0", |
31 | | - lean: "px-4 py-2", |
| 35 | + default: '', |
| 36 | + none: 'p-0', |
| 37 | + lean: 'px-4 py-2', |
32 | 38 | }, |
33 | 39 | }, |
34 | 40 | compoundVariants: [ |
35 | 41 | { |
36 | | - size: "12px", |
37 | | - padding: "default", |
38 | | - class: "p-8px", |
| 42 | + size: '12px', |
| 43 | + padding: 'default', |
| 44 | + class: 'p-8px', |
39 | 45 | }, |
40 | 46 | { |
41 | | - size: "14px", |
42 | | - padding: "default", |
43 | | - class: "p-8px", |
| 47 | + size: '14px', |
| 48 | + padding: 'default', |
| 49 | + class: 'p-8px', |
44 | 50 | }, |
45 | 51 | { |
46 | | - size: "16px", |
47 | | - padding: "default", |
48 | | - class: "p-12px", |
| 52 | + size: '16px', |
| 53 | + padding: 'default', |
| 54 | + class: 'p-12px', |
49 | 55 | }, |
50 | 56 | { |
51 | | - size: "18px", |
52 | | - padding: "default", |
53 | | - class: "p-12px", |
| 57 | + size: '18px', |
| 58 | + padding: 'default', |
| 59 | + class: 'p-12px', |
54 | 60 | }, |
55 | 61 | { |
56 | | - size: "20px", |
57 | | - padding: "default", |
58 | | - class: "p-16px", |
| 62 | + size: '20px', |
| 63 | + padding: 'default', |
| 64 | + class: 'p-16px', |
59 | 65 | }, |
60 | 66 | { |
61 | | - size: "24px", |
62 | | - padding: "default", |
63 | | - class: "p-16px", |
| 67 | + size: '24px', |
| 68 | + padding: 'default', |
| 69 | + class: 'p-16px', |
64 | 70 | }, |
65 | 71 | ], |
66 | 72 | defaultVariants: { |
67 | | - variant: "fill", |
68 | | - size: "16px", |
69 | | - padding: "default", |
| 73 | + variant: 'fill', |
| 74 | + size: '16px', |
| 75 | + padding: 'default', |
70 | 76 | }, |
71 | 77 | } |
72 | 78 | ); |
|
0 commit comments