blob: 8e7c4b5807d3f467394104e7b4b97818b91d923a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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}
|