1
1
import * as React from "react"
2
2
import { Slot } from "@radix-ui/react-slot"
3
3
import { cva , type VariantProps } from "class-variance-authority"
4
-
4
+
5
5
import { cn } from "src"
6
-
6
+
7
7
const buttonVariants = cva (
8
8
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0" ,
9
9
{
@@ -14,7 +14,7 @@ const buttonVariants = cva(
14
14
destructive :
15
15
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90" ,
16
16
outline :
17
- "border border-input bg-paper shadow-sm hover:bg-accent hover:text-accent-foreground" ,
17
+ "border border-input bg-muted shadow-sm hover:bg-accent hover:text-accent-foreground" ,
18
18
secondary :
19
19
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80" ,
20
20
ghost : "hover:bg-accent hover:text-accent-foreground" ,
@@ -33,13 +33,13 @@ const buttonVariants = cva(
33
33
} ,
34
34
}
35
35
)
36
-
36
+
37
37
export interface ButtonProps
38
38
extends React . ButtonHTMLAttributes < HTMLButtonElement > ,
39
39
VariantProps < typeof buttonVariants > {
40
40
asChild ?: boolean
41
41
}
42
-
42
+
43
43
const Button = React . forwardRef < HTMLButtonElement , ButtonProps > (
44
44
( { className, variant, size, asChild = false , ...props } , ref ) => {
45
45
const Comp = asChild ? Slot : "button"
@@ -53,5 +53,5 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
53
53
}
54
54
)
55
55
Button . displayName = "Button"
56
-
56
+
57
57
export { Button , buttonVariants }
0 commit comments