@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;
@@ -34,6 +34,7 @@ export interface BaseStackProps<TElementType extends ElementType = 'div'> extend
34
34
  */
35
35
  centered?: boolean;
36
36
  width?: CSSProperties['width'];
37
+ height?: CSSProperties['height'];
37
38
  style?: CSSProperties;
38
39
  className?: string;
39
40
  }
@@ -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,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@goncharovv/layout",
3
3
  "private": false,
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",