UNPKG

1.14 kBTypeScriptView Raw
1import { BoxProps } from "../Box";
2import * as React from "react";
3import * as StyledSystem from "styled-system";
4import { FlexProps } from "../Flex";
5
6interface IStack {
7 /**
8 * If `true` the items will be stacked horizontally inline.
9 */
10 isInline?: boolean;
11 /**
12 * If `true` the items will be displayed in reverse order.
13 */
14 isReversed?: boolean;
15 /**
16 * The direction to stack the items.
17 */
18 direction?: FlexProps["direction"];
19 /**
20 * The content of the stack.
21 */
22 children?: React.ReactNode;
23 /**
24 * The space between each stack item
25 */
26 spacing?: StyledSystem.MarginProps["margin"];
27 /**
28 * The alignment of the stack item. Similar to `align-items`
29 */
30 align?: FlexProps["align"];
31 /**
32 * The distribution of the stack item. Similar to `justify-content`
33 */
34 justify?: FlexProps["justify"];
35 /**
36 * If `true`, the children will be wrapped in a `Box` with
37 * `display: inline-block`, and the `Box` will take the spacing props
38 */
39 shouldWrapChildren?: boolean;
40}
41
42export type StackProps = IStack & BoxProps;
43
44declare const Stack: React.FC<StackProps>;
45
46export default Stack;