-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding stretch to the align items options (#290)
* Adding stretch to the align items options * Adding docs for container * Removing unused prop. * Updating example min and maxWidth * Adding Layout section of navigation * Fixing lint error.
- Loading branch information
Showing
3 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import { Container } from "./Container"; | ||
import { Text } from ".."; | ||
import styled from "styled-components"; | ||
|
||
const GridCenter = styled.div` | ||
display: grid; | ||
place-items: center; | ||
width: 100%; | ||
height: 100%; | ||
`; | ||
|
||
const ContainerExample = ({ ...props }) => { | ||
return ( | ||
<GridCenter> | ||
<Container | ||
{...props} | ||
style={{ border: "1px solid grey" }} | ||
> | ||
<Text>Parent container</Text> | ||
<Container | ||
{...props} | ||
style={{ border: "1px solid grey" }} | ||
> | ||
<Text>Child</Text> | ||
</Container> | ||
<Container | ||
{...props} | ||
style={{ border: "1px solid grey" }} | ||
> | ||
<Text>Child</Text> | ||
</Container> | ||
<Container | ||
{...props} | ||
style={{ border: "1px solid grey" }} | ||
> | ||
<Text>Child</Text> | ||
</Container> | ||
</Container> | ||
</GridCenter> | ||
); | ||
}; | ||
|
||
export default { | ||
component: ContainerExample, | ||
title: "Layout/Container", | ||
tags: ["container", "autodocs"], | ||
argTypes: { | ||
alignItems: { control: "select", options: ["start", "center", "end", "stretch"] }, | ||
fillWidth: { control: "boolean" }, | ||
gap: { | ||
control: "select", | ||
options: ["none", "xxs", "xs", "sm", "md", "lg", "xl", "xxl"], | ||
}, | ||
grow: { | ||
control: "select", | ||
options: ["0", "1", "2", "3", "4", "5", "6"], | ||
}, | ||
shrink: { | ||
control: "select", | ||
options: ["0", "1", "2", "3", "4", "5", "6"], | ||
}, | ||
isResponsive: { control: "boolean" }, | ||
justifyContent: { | ||
control: "select", | ||
options: [ | ||
"center", | ||
"space-between", | ||
"space-around", | ||
"space-evenly", | ||
"start", | ||
"end", | ||
"left", | ||
"right", | ||
], | ||
}, | ||
orientation: { control: "radio", options: ["horizontal", "vertical"] }, | ||
padding: { | ||
control: "select", | ||
options: ["none", "xxs", "xs", "sm", "md", "lg", "xl", "xxl"], | ||
}, | ||
wrap: { | ||
control: "select", | ||
options: ["nowrap", "wrap", "wrap-reverse"], | ||
}, | ||
}, | ||
}; | ||
|
||
export const Playground = { | ||
args: { | ||
alignItems: "center", | ||
fillWidth: false, | ||
gap: "none", | ||
grow: "0", | ||
isResponsive: true, | ||
justifyContent: "start", | ||
maxWidth: "auto", | ||
minWidth: "auto", | ||
orientation: "horizontal", | ||
padding: "none", | ||
shrink: "0", | ||
wrap: "nowrap", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2573ea9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
click-ui – ./
click-ui-git-main-clickhouse.vercel.app
click-ui-clickhouse.vercel.app
click-ui.vercel.app