aboutsummaryrefslogblamecommitdiffstats
path: root/packages/dev-tools-pages/ts/components/Content.tsx
blob: 328ef07781f98e2bd065360743993737935618fd (plain) (tree)
1
2
3
4
5
6
7
8
9


                                       
                                        
 



                  

                            




                               


                        

                  

  
                     
                   


                              




                                                               
 
                   
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;
    children: React.ReactNode;
}

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

export { Content };