Skip to content

Commit

Permalink
feat(ui): FlexStart component
Browse files Browse the repository at this point in the history
  • Loading branch information
vio committed Aug 17, 2020
1 parent 97d0d6a commit 0285cd6
Show file tree
Hide file tree
Showing 9 changed files with 562 additions and 24 deletions.
23 changes: 23 additions & 0 deletions packages/ui/src/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export const NO_SPACE = 'no-space';
export const SPACE_XXXSMALL = 'xxxsmall';
export const SPACE_XXSMALL = 'xxsmall';
export const SPACE_XSMALL = 'xsmall';
export const SPACE_SMALL = 'small';
export const SPACE_MEDIUM = 'medium';
export const SPACE_LARGE = 'large';
export const SPACE_XLARGE = 'xlarge';
export const SPACE_XXLARGE = 'xxlarge';
export const SPACE_XXXLARGE = 'xxxlarge';

export const SPACES = [
NO_SPACE,
SPACE_XXXSMALL,
SPACE_XXSMALL,
SPACE_XSMALL,
SPACE_SMALL,
SPACE_MEDIUM,
SPACE_LARGE,
SPACE_XLARGE,
SPACE_XXLARGE,
SPACE_XXXLARGE,
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Storyshots Layout/FlexStack default 1`] = `
<div
style={
Object {
"height": "100%",
"padding": "24px",
"width": "100%",
}
}
>
<FlexStack
as="div"
className=""
space="no-space"
>
<Box
as="div"
className=""
>
Lorem ipsum 1
</Box>
<Box
as="div"
className=""
>
Lorem ipsum 2
</Box>
Lorem ipsum 3
</FlexStack>
</div>
`;

exports[`Storyshots Layout/FlexStack single item 1`] = `
<div
style={
Object {
"height": "100%",
"padding": "24px",
"width": "100%",
}
}
>
<FlexStack
as="div"
className=""
space="no-space"
>
<Box
as="div"
className=""
>
Lorem ipsum
</Box>
</FlexStack>
</div>
`;

exports[`Storyshots Layout/FlexStack with custom wrapper 1`] = `
<div
style={
Object {
"height": "100%",
"padding": "24px",
"width": "100%",
}
}
>
<FlexStack
as="main"
className="wrapper"
space="no-space"
>
<Box
as="div"
className=""
>
Lorem ipsum 1
</Box>
<Box
as="div"
className=""
>
Lorem ipsum 2
</Box>
</FlexStack>
</div>
`;

exports[`Storyshots Layout/FlexStack with large space 1`] = `
<div
style={
Object {
"height": "100%",
"padding": "24px",
"width": "100%",
}
}
>
<FlexStack
as="div"
className=""
space="large"
>
<Box
as="div"
className=""
>
Lorem ipsum 1
</Box>
<Box
as="div"
className=""
>
Lorem ipsum 2
</Box>
<Box
as="div"
className=""
>
Lorem ipsum 3
</Box>
</FlexStack>
</div>
`;

exports[`Storyshots Layout/FlexStack with nested stack 1`] = `
<div
style={
Object {
"height": "100%",
"padding": "24px",
"width": "100%",
}
}
>
<FlexStack
as="div"
className=""
space="large"
>
<Box
as="div"
className=""
>
Lorem ipsum 1
</Box>
<Box
as="div"
className=""
>
Lorem ipsum 2
</Box>
<FlexStack
as="div"
className=""
space="small"
>
<Box
as="div"
className=""
>
Lorem ipsum 3.1
</Box>
<Box
as="div"
className=""
>
Lorem ipsum 3.2
</Box>
</FlexStack>
</FlexStack>
</div>
`;

exports[`Storyshots Layout/FlexStack with null child 1`] = `
<div
style={
Object {
"height": "100%",
"padding": "24px",
"width": "100%",
}
}
>
<FlexStack
as="div"
className=""
space="large"
>
<Box
as="div"
className=""
>
Lorem ipsum 1
</Box>
</FlexStack>
</div>
`;
Loading

0 comments on commit 0285cd6

Please sign in to comment.