Archived
2
0
Fork 0

Adding sense of self to the UI, cleaning up routing, adding third (detail) column

This commit is contained in:
Eugen Rochko 2016-09-13 02:24:40 +02:00
parent d6a64f45fd
commit 2e7aac793a
16 changed files with 160 additions and 49 deletions

View file

@ -5,7 +5,8 @@ const Column = React.createClass({
propTypes: {
heading: React.PropTypes.string,
icon: React.PropTypes.string
icon: React.PropTypes.string,
fluid: React.PropTypes.bool
},
mixins: [PureRenderMixin],
@ -22,8 +23,16 @@ const Column = React.createClass({
header = <ColumnHeader icon={this.props.icon} type={this.props.heading} onClick={this.handleHeaderClick} />;
}
const style = { width: '350px', flex: '0 0 auto', background: '#282c37', margin: '10px', marginRight: '0', display: 'flex', flexDirection: 'column' };
if (this.props.fluid) {
style.width = 'auto';
style.flex = '1 1 auto';
style.background = '#21242d';
}
return (
<div style={{ width: '380px', flex: '0 0 auto', background: '#282c37', margin: '10px', marginRight: '0', display: 'flex', flexDirection: 'column' }}>
<div style={style}>
{header}
{this.props.children}
</div>