1 | import { BoxProps } from "../Box";
|
2 | import * as React from "react";
|
3 | import * as StyledSystem from "styled-system";
|
4 | import { FlexProps } from "../Flex";
|
5 |
|
6 | interface 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 |
|
42 | export type StackProps = IStack & BoxProps;
|
43 |
|
44 | declare const Stack: React.FC<StackProps>;
|
45 |
|
46 | export default Stack;
|