@bouko/react 1.9.7 → 1.9.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,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn, tv } from "@bouko/style";
|
|
3
3
|
/**
|
|
4
4
|
* Flex containers with configurable alignment and styling.
|
|
@@ -7,8 +7,16 @@ import { cn, tv } from "@bouko/style";
|
|
|
7
7
|
* @param {ReactNode} children - Child elements to render inside the row.
|
|
8
8
|
* @param {Props} opts - Variant options for styling.
|
|
9
9
|
**/
|
|
10
|
-
export const RowBox = ({ style, children, ...opts }) =>
|
|
11
|
-
|
|
10
|
+
export const RowBox = ({ style, children, ...opts }) => {
|
|
11
|
+
if (!children)
|
|
12
|
+
return _jsx(_Fragment, {});
|
|
13
|
+
return (_jsx("div", { className: cn(row(opts), style), children: children }));
|
|
14
|
+
};
|
|
15
|
+
export const ColumnBox = ({ style, children, ...opts }) => {
|
|
16
|
+
if (!children)
|
|
17
|
+
return _jsx(_Fragment, {});
|
|
18
|
+
return (_jsx("div", { className: cn(column(opts), style), children: children }));
|
|
19
|
+
};
|
|
12
20
|
/**
|
|
13
21
|
* Styling variants for flex options.
|
|
14
22
|
*
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
1
|
type Color = "accent" | "orange" | "dark";
|
|
3
2
|
type Props = {
|
|
4
3
|
style?: string;
|
|
5
4
|
color?: Color;
|
|
6
|
-
children
|
|
5
|
+
children?: string;
|
|
7
6
|
};
|
|
8
7
|
export default function Badge({ style, color, children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn, tv } from "@bouko/style";
|
|
3
3
|
export default function Badge({ style, color, children }) {
|
|
4
|
+
if (!children)
|
|
5
|
+
return _jsx(_Fragment, {});
|
|
4
6
|
return (_jsx("span", { className: cn(styles({ color }), style), children: children }));
|
|
5
7
|
}
|
|
6
8
|
const styles = tv({
|
package/dist/core/types.d.ts
CHANGED