aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-tools-pages/ts/components/content.tsx
blob: 55550441c387d52acfb2b89459c61f6c52d06e84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import * as React from 'react';
import styled from 'styled-components';

import { Container } from './Container';

const StyledMain =
    styled.div <
    MainProps >
    `
    padding-top: 6.25rem;
    padding-bottom: 6.25rem;
    ${props =>
        props.dark
            ? `
        background-color: #000;
        color: #fff;
        p:not([class]) {
            color: #CCC;
        }
    `
            : ''};
`;

interface MainProps {
    dark?: boolean;
}

const Content: React.StatelessComponent<MainProps> = props => (
    <StyledMain dark={props.dark}>
        <Container>{props.children}</Container>
    </StyledMain>
);

export { Content };