@bouko/react 2.8.8 → 2.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import type { Component } from "../../core/types";
|
|
3
3
|
export type ButtonProps = Component & {
|
|
4
|
-
variant?: "primary" | "outline" | "ghost" | "secondary";
|
|
4
|
+
variant?: "primary" | "outline" | "ghost" | "secondary" | "error";
|
|
5
5
|
size?: "xs" | "sm" | "md" | "lg";
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
action?: () => void;
|
|
@@ -25,10 +25,11 @@ const styles = tv({
|
|
|
25
25
|
primary: "bg-primary border-primary-dark",
|
|
26
26
|
outline: "bg-transparent border-accent hover:border-accent-dark text-primary",
|
|
27
27
|
ghost: "bg-transparent border-transparent text-accent hover:brightness-110",
|
|
28
|
-
secondary: "bg-background-dark dark:bg-background-light border-border-dark dark:border-border-light text-background-darker dark:text-primary"
|
|
28
|
+
secondary: "bg-background-dark dark:bg-background-light border-border-dark dark:border-border-light text-background-darker dark:text-primary",
|
|
29
|
+
error: "bg-error border-error-dark"
|
|
29
30
|
},
|
|
30
31
|
size: {
|
|
31
|
-
xs: "px-
|
|
32
|
+
xs: "gap-1 px-2 py-1 text-xs font-medium",
|
|
32
33
|
circle: "px-2 py-2 text-xs rounded-full",
|
|
33
34
|
sm: "px-3 py-2 text-xs sm:text-sm",
|
|
34
35
|
md: "px-4 py-2",
|