2017-01-09 14:13:12 +02:00
|
|
|
const Column = require('../column');
|
2017-01-09 20:58:30 +02:00
|
|
|
const Styled = require('styled-components');
|
2017-01-09 14:13:12 +02:00
|
|
|
const React = require('react');
|
|
|
|
|
2017-01-09 20:58:30 +02:00
|
|
|
const {
|
|
|
|
default: styled
|
|
|
|
} = Styled;
|
2017-01-09 14:13:12 +02:00
|
|
|
|
2017-01-09 20:58:30 +02:00
|
|
|
const display = (props) => props.collapsed
|
|
|
|
? 'none'
|
|
|
|
: 'block';
|
|
|
|
|
|
|
|
const StyledColumn = styled(Column)`
|
|
|
|
display: ${display}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const Outlet = (props) => (
|
|
|
|
<StyledColumn
|
2017-02-03 17:21:57 +02:00
|
|
|
md={6}
|
2017-01-09 20:58:30 +02:00
|
|
|
name='list-item-outlet'
|
2017-02-03 17:21:57 +02:00
|
|
|
xs={12}
|
2017-01-09 20:58:30 +02:00
|
|
|
{...props}
|
|
|
|
>
|
|
|
|
{props.children}
|
|
|
|
</StyledColumn>
|
|
|
|
);
|
2017-01-09 14:13:12 +02:00
|
|
|
|
|
|
|
Outlet.propTypes = {
|
2017-01-09 20:58:30 +02:00
|
|
|
children: React.PropTypes.node
|
2017-01-09 14:13:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Outlet;
|