2018-11-23 15:46:06 -08:00
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
import styled from 'styled-components';
|
2018-11-28 14:00:25 -08:00
|
|
|
|
|
|
|
const Layout = styled.div`
|
2018-12-10 16:40:17 -08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2018-12-12 11:03:35 -08:00
|
|
|
width: ${props => `calc(100% - ${props.theme.sidebarWidth})`};
|
|
|
|
height: ${props => `calc(100vh - ${props.theme.headerHeight})`};
|
2018-12-11 16:35:04 -08:00
|
|
|
background-color: ${props => props.theme.colors.background};
|
2018-12-12 11:03:35 -08:00
|
|
|
padding-left: ${props => props.theme.layoutPaddingLeft};
|
|
|
|
padding-right: ${props => props.theme.layoutPaddingRight};
|
2018-11-28 14:00:25 -08:00
|
|
|
`;
|
2018-11-23 15:46:06 -08:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
chidren: any, // eslint-disable-line
|
|
|
|
};
|
|
|
|
|
|
|
|
export const LayoutComponent = (props: Props) => {
|
|
|
|
// $FlowFixMe
|
|
|
|
const { children } = props; // eslint-disable-line
|
|
|
|
|
2018-12-03 11:27:56 -08:00
|
|
|
return <Layout>{children}</Layout>;
|
2018-11-23 15:46:06 -08:00
|
|
|
};
|