2020-03-27 13:59:38 -07:00
|
|
|
import PropTypes from 'prop-types';
|
2022-01-10 14:17:52 -08:00
|
|
|
import React from 'react';
|
2020-03-27 13:59:38 -07:00
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
2022-01-10 14:17:52 -08:00
|
|
|
import { injectIntl } from 'react-intl';
|
2020-03-27 13:59:38 -07:00
|
|
|
|
2022-03-21 11:09:01 -07:00
|
|
|
import { Layout } from '../../../components/ui';
|
|
|
|
|
2020-03-27 13:59:38 -07:00
|
|
|
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;
|
2021-11-24 09:28:35 -08:00
|
|
|
const layout = this.props.layout || { LEFT: null, RIGHT: null };
|
2020-03-27 13:59:38 -07:00
|
|
|
|
|
|
|
return (
|
2022-03-21 11:09:01 -07:00
|
|
|
<Layout>
|
|
|
|
<Layout.Sidebar>
|
|
|
|
{layout.LEFT}
|
|
|
|
</Layout.Sidebar>
|
|
|
|
|
|
|
|
<Layout.Main>
|
|
|
|
{children}
|
|
|
|
</Layout.Main>
|
|
|
|
|
|
|
|
<Layout.Aside>
|
|
|
|
{layout.RIGHT}
|
|
|
|
</Layout.Aside>
|
|
|
|
</Layout>
|
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
|
|
|
}
|