aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/background.tsx
blob: 808792a41c2c8c7f23ad56fa837467dac310aa89 (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
import { colors } from '@0xproject/react-shared';
import * as React from 'react';
import { styled } from 'ts/style/theme';
import { zIndex } from 'ts/style/z_index';

export interface BackgroundProps {
    color?: string;
}

const PlainBackground: React.StatelessComponent<BackgroundProps> = props => <div {...props} />;

export const Background = styled(PlainBackground)`
    background-color: ${props => props.color};
    height: 100vh;
    width: 100vw;
    position: fixed;
    z-index: ${zIndex.background};
`;

Background.defaultProps = {
    color: colors.lightestGrey,
};

Background.displayName = 'Background';