@bouko/react 1.6.2 → 1.6.4
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.
|
@@ -7,4 +7,4 @@ export type ButtonProps = {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
};
|
|
10
|
-
export declare function Button({ variant, style, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function Button({ size, variant, style, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn, tv } from "@bouko/style";
|
|
3
|
-
export function Button({ variant, style, ...props }) {
|
|
4
|
-
return (_jsx("button", { className: cn(styles({ variant }), style), ...props }));
|
|
3
|
+
export function Button({ size, variant, style, ...props }) {
|
|
4
|
+
return (_jsx("button", { className: cn(styles({ variant, size }), style), ...props }));
|
|
5
5
|
}
|
|
6
6
|
const styles = tv({
|
|
7
7
|
base: "flex items-center gap-2 bg-accent hover:bg-accent-dark border border-accent-dark rounded font-semibold text-background-light duration-200 cursor-pointer disabled:cursor-not-allowed",
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { useContainer, useResize } from "../../hooks";
|
|
5
|
-
import { cn, tv } from "@bouko/style";
|
|
2
|
+
import { cn } from "@bouko/style";
|
|
6
3
|
export default function Separator({ style }) {
|
|
7
|
-
|
|
8
|
-
const [flow, setFlow] = useState();
|
|
9
|
-
useResize(container, () => {
|
|
10
|
-
const css = getComputedStyle(container);
|
|
11
|
-
setFlow(css.flexDirection);
|
|
12
|
-
});
|
|
13
|
-
return (_jsx("div", { className: cn(styles({ flow }), style), ref: ref }));
|
|
4
|
+
return _jsx("hr", { className: cn("w-full text-border-dark", style) });
|
|
14
5
|
}
|
|
15
|
-
;
|
|
16
|
-
const styles = tv({
|
|
17
|
-
base: "shrink-0 bg-border-dark",
|
|
18
|
-
variants: {
|
|
19
|
-
flow: {
|
|
20
|
-
row: "w-px min-w-px h-full",
|
|
21
|
-
column: "w-full h-px min-h-px"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
});
|