2020-03-27 13:59:38 -07:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { injectIntl } from 'react-intl';
|
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
|
|
|
|
|
|
|
export default @(component => injectIntl(component, { withRef: true }))
|
|
|
|
class ColumnsArea extends ImmutablePureComponent {
|
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
columns: ImmutablePropTypes.list.isRequired,
|
|
|
|
children: PropTypes.node,
|
|
|
|
layout: PropTypes.object,
|
|
|
|
};
|
|
|
|
|
2020-04-14 14:47:35 -07:00
|
|
|
render() {
|
2020-04-14 13:45:38 -07:00
|
|
|
const { children } = this.props;
|
2020-04-14 11:44:40 -07:00
|
|
|
const layout = this.props.layout || { LEFT:null, RIGHT:null };
|
2020-03-27 13:59:38 -07:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div className='page'>
|
|
|
|
<div className='page__columns'>
|
|
|
|
<div className='columns-area__panels'>
|
|
|
|
|
|
|
|
<div className='columns-area__panels__pane columns-area__panels__pane--left'>
|
2020-08-16 13:24:41 -07:00
|
|
|
<div className='columns-area__panels__pane__inner'>
|
|
|
|
{layout.LEFT}
|
|
|
|
</div>
|
2020-03-27 13:59:38 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className='columns-area__panels__main'>
|
|
|
|
<div className='columns-area columns-area--mobile'>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
|
2020-08-16 13:24:41 -07:00
|
|
|
<div className='columns-area__panels__pane__inner'>
|
|
|
|
{layout.RIGHT}
|
|
|
|
</div>
|
2020-03-27 13:59:38 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2020-04-14 11:44:40 -07:00
|
|
|
);
|
2020-03-27 13:59:38 -07:00
|
|
|
}
|
2020-04-14 11:44:40 -07:00
|
|
|
|
2020-03-27 13:59:38 -07:00
|
|
|
}
|