diff options
Diffstat (limited to 'ui/app/components/layout/index.js')
-rw-r--r-- | ui/app/components/layout/index.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ui/app/components/layout/index.js b/ui/app/components/layout/index.js new file mode 100644 index 0000000..8e7c4b5 --- /dev/null +++ b/ui/app/components/layout/index.js @@ -0,0 +1,41 @@ +import React from 'react' + +import './layout.less' + +class HorizontalLayout extends React.Component { + static get defaultProps() {return{ + equalWidths: false + }} + + constructor(props) { + super(props) + } + + render() { + let className = "horizontal-layout" + if (this.props.equalWidths) { + className = className + " equal" + this.props.children.length + } + return ( + <div className={className}> + {this.props.children} + </div> + ) + } +} + +class Column extends React.Component { + constructor(props) { + super(props) + } + + render() { + return ( + <div className="layout-column"> + {this.props.children} + </div> + ) + } +} + +export {HorizontalLayout, Column}
\ No newline at end of file |