-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improved renderDirection * Implemented row wrap * Improved rendering by removing redundant output * Improved story for row wrap
- Loading branch information
Showing
13 changed files
with
342 additions
and
99 deletions.
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
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import RowDirection from "./RowDirection"; | ||
import RowWrap from "./RowWrap"; | ||
import { BreakpointValue } from "../media"; | ||
import { ThemeProperties } from "../theme"; | ||
|
||
export default interface RowProperties extends ThemeProperties { | ||
direction?: BreakpointValue<RowDirection>; | ||
noGutter?: BreakpointValue<boolean>; | ||
wrap?: BreakpointValue<RowWrap>; | ||
} |
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,43 @@ | ||
import * as React from "react"; | ||
import { storiesOf } from "@storybook/react"; | ||
import { action } from "@storybook/addon-actions"; | ||
|
||
import { Column, Container, Row } from ".."; | ||
|
||
storiesOf("RowWrap", module) | ||
.add("nowrap", () => ( | ||
<div> | ||
<Container> | ||
<Row wrap={"nowrap"}> | ||
<Column size={6}>Nowrap 1</Column> | ||
<Column size={6}>Nowrap 2</Column> | ||
<Column size={6}>Nowrap 3</Column> | ||
<Column size={6}>Nowrap 4</Column> | ||
</Row> | ||
</Container> | ||
</div> | ||
)) | ||
.add("wrap", () => ( | ||
<div> | ||
<Container> | ||
<Row wrap={"wrap"}> | ||
<Column size={6}>Wrap 1</Column> | ||
<Column size={6}>Wrap 2</Column> | ||
<Column size={6}>Wrap 3</Column> | ||
<Column size={6}>Wrap 4</Column> | ||
</Row> | ||
</Container> | ||
</div> | ||
)) | ||
.add("wrap-reverse", () => ( | ||
<div> | ||
<Container> | ||
<Row wrap={"wrap-reverse"}> | ||
<Column size={6}>Wrap Reverse 1</Column> | ||
<Column size={6}>Wrap Reverse 2</Column> | ||
<Column size={6}>Wrap Reverse 3</Column> | ||
<Column size={6}>Wrap Reverse 4</Column> | ||
</Row> | ||
</Container> | ||
</div> | ||
)); |
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,3 @@ | ||
type RowDirection = "nowrap" | "wrap" | "wrap-reverse"; | ||
|
||
export default RowDirection; |
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
Oops, something went wrong.