@bouko/react 1.5.6 → 1.5.7
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,9 +1,16 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
type Props = Position & {
|
|
3
3
|
style?: string;
|
|
4
4
|
children: ReactNode;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
|
+
type Position = {
|
|
7
|
+
center?: boolean;
|
|
8
|
+
centerX?: boolean;
|
|
9
|
+
centerY?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function ColumnBox({ style, center, centerX, centerY, children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
12
|
export declare function RowBox({ style, children }: {
|
|
7
13
|
style?: string;
|
|
8
14
|
children: ReactNode;
|
|
9
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
package/dist/components/flex.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@bouko/style";
|
|
3
|
-
export function ColumnBox({ style, children }) {
|
|
4
|
-
return (_jsx("div", { className: cn("flex flex-col", style), children: children }));
|
|
3
|
+
export function ColumnBox({ style, center, centerX, centerY, children }) {
|
|
4
|
+
return (_jsx("div", { className: cn("flex flex-col", center && "items-center justify-center", centerX && "items-center", centerY && "justify-center", style), children: children }));
|
|
5
5
|
}
|
|
6
6
|
export function RowBox({ style, children }) {
|
|
7
7
|
return (_jsx("div", { className: cn("flex", style), children: children }));
|