parent
30c963a5f0
commit
61a1c93f0f
89 changed files with 15859 additions and 2 deletions
27
client/components/layout/grids.jsx
Normal file
27
client/components/layout/grids.jsx
Normal file
|
@ -0,0 +1,27 @@
|
|||
import React from "react";
|
||||
|
||||
const styleGridBase = {
|
||||
float: "left",
|
||||
margin: 0
|
||||
};
|
||||
|
||||
export const Grids = props => (
|
||||
<div style={props.containerStyle}>
|
||||
{props.nodes.map(node => (
|
||||
<div
|
||||
className="grid"
|
||||
key={node.key}
|
||||
style={{ ...props.gridStyle, ...node.style }}
|
||||
>
|
||||
{node.component}
|
||||
</div>
|
||||
))}
|
||||
<div style={{ clear: "both" }} />
|
||||
</div>
|
||||
);
|
||||
|
||||
Grids.defaultProps = {
|
||||
nodes: [{ key: "key", component: <span />, style: {} }],
|
||||
gridStyle: styleGridBase,
|
||||
containerStyle: {}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue