@goncharovv/layout 0.1.4 → 0.1.5
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.
|
@@ -14,6 +14,7 @@ export declare const HStack: <TElementType extends import("react").ElementType =
|
|
|
14
14
|
flex?: import("csstype").Property.Flex<string | number> | undefined;
|
|
15
15
|
centered?: boolean | undefined;
|
|
16
16
|
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
17
|
+
height?: import("csstype").Property.Height<string | number> | undefined;
|
|
17
18
|
style?: import("react").CSSProperties | undefined;
|
|
18
19
|
className?: string | undefined;
|
|
19
20
|
children?: import("react").ReactNode;
|
|
@@ -20,6 +20,7 @@ export declare const Stack: <TElementType extends ElementType = "div">(props: im
|
|
|
20
20
|
flex?: import("csstype").Property.Flex<string | number> | undefined;
|
|
21
21
|
centered?: boolean | undefined;
|
|
22
22
|
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
23
|
+
height?: import("csstype").Property.Height<string | number> | undefined;
|
|
23
24
|
style?: CSSProperties | undefined;
|
|
24
25
|
className?: string | undefined;
|
|
25
26
|
children?: import("react").ReactNode;
|
|
@@ -14,6 +14,7 @@ export declare const VStack: <TElementType extends import("react").ElementType =
|
|
|
14
14
|
flex?: import("csstype").Property.Flex<string | number> | undefined;
|
|
15
15
|
centered?: boolean | undefined;
|
|
16
16
|
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
17
|
+
height?: import("csstype").Property.Height<string | number> | undefined;
|
|
17
18
|
style?: import("react").CSSProperties | undefined;
|
|
18
19
|
className?: string | undefined;
|
|
19
20
|
children?: import("react").ReactNode;
|
|
@@ -7,7 +7,7 @@ export function createStack(name, options) {
|
|
|
7
7
|
const Component = function GenericStack(_props) {
|
|
8
8
|
const props = options.overrideProps ? options.overrideProps(_props) : _props;
|
|
9
9
|
// WARNING: Avoid proxying *component props* to real DOM
|
|
10
|
-
const { as: Element = 'div', align, alignItems, centered, gap, justify, justifyContent, spacing, style, wrap, className, children, p, pv, ph, width, flex, ...rest } = props;
|
|
10
|
+
const { as: Element = 'div', align, alignItems, centered, gap, justify, justifyContent, spacing, style, wrap, className, children, p, pv, ph, width, height, flex, ...rest } = props;
|
|
11
11
|
return (_jsx(Element, { ...rest, className: cn(styles.stack, {
|
|
12
12
|
[styles.centered]: centered,
|
|
13
13
|
}, className), style: {
|
|
@@ -16,6 +16,7 @@ export function createStack(name, options) {
|
|
|
16
16
|
alignItems: centered ? undefined : (alignItems ?? align),
|
|
17
17
|
justifyContent: centered ? undefined : (justifyContent ?? justify),
|
|
18
18
|
width,
|
|
19
|
+
height,
|
|
19
20
|
flex,
|
|
20
21
|
...getPaddingStyles({ p, pv, ph }),
|
|
21
22
|
...style,
|