Skip to content
This repository has been archived by the owner on Dec 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from JSBros/v0.1.2
Browse files Browse the repository at this point in the history
v0.1.2 Release
  • Loading branch information
Garet McKinley authored Nov 10, 2016
2 parents 65c8b2f + 9431d73 commit 5a02ff9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,25 @@ class App extends Component {
<h1>This is a column that's centered using the shift props</h1>
</Column>
</Row>
<Row>
<Column fluid sm={4}>
<h1>Fluid Columns</h1>
</Column>
<Column fluid sm={4}>
<p>It's a 12 column layout by default.</p>
</Column>
<Column fluid sm={4}>
<Row divisions={24}>
<Column sm={24}>
<p>
But you can change the amount of columns by adding the
`divisions` property to a Row.
</p>
<p>It's fully embeddable as well!</p>
</Column>
</Row>
</Column>
</Row>
};
}
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hedron",
"version": "0.1.1",
"version": "0.1.2",
"description": "A no-frills flex-box grid system for React.",
"main": "dist/hedron.js",
"scripts": {
Expand Down
9 changes: 7 additions & 2 deletions src/components/Row.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ import { divvy } from '../utils';


function RowContainer(props) {
const { divisions, ...rest } = props;
return <section {...rest} />;
const { children, divisions, ...rest } = props;
const scaledChildren = React.Children.map(children,
child => React.cloneElement(child, {
divisions: divisions
})
);
return <section {...rest} children={scaledChildren} />;
}

RowContainer.propTypes = {
Expand Down

0 comments on commit 5a02ff9

Please sign in to comment.