1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-06-02 17:45:05 +07:00
verdaccio-ui/src/components/Layout/Layout.tsx

30 lines
662 B
TypeScript
Raw Normal View History

import styled from '@emotion/styled';
import { css } from '@emotion/core';
import { Theme } from '../../design-tokens/theme';
2019-02-03 17:23:33 +07:00
export const Content = styled('div')<{ theme?: Theme }>(props => ({
backgroundColor: props.theme && props.theme.palette.white,
flex: 1,
display: 'flex',
position: 'relative',
flexDirection: 'column',
}));
2019-02-03 17:23:33 +07:00
interface ContainerProps {
isLoading: boolean;
}
export const Container = styled('div')<ContainerProps>(props => ({
display: 'flex',
flexDirection: 'column',
minHeight: '100vh',
overflow: 'hidden',
...(props.isLoading &&
css`
${Content} {
background-color: #f5f6f8;
}
`),
}));