diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-06-22 01:34:45 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-22 08:40:33 +0800 |
commit | 79edc12c764097bb46f6dd40fe1f10fd8944f583 (patch) | |
tree | 74f1fe3a891a9eae481f2294351af7810f9c5444 /packages/website/ts/components/ui | |
parent | bd03151c2a10c680bb8a12e0bdd73590381aa4ca (diff) | |
download | dexon-sol-tools-79edc12c764097bb46f6dd40fe1f10fd8944f583.tar.gz dexon-sol-tools-79edc12c764097bb46f6dd40fe1f10fd8944f583.tar.zst dexon-sol-tools-79edc12c764097bb46f6dd40fe1f10fd8944f583.zip |
Add Background component
Diffstat (limited to 'packages/website/ts/components/ui')
-rw-r--r-- | packages/website/ts/components/ui/background.tsx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/website/ts/components/ui/background.tsx b/packages/website/ts/components/ui/background.tsx new file mode 100644 index 000000000..808792a41 --- /dev/null +++ b/packages/website/ts/components/ui/background.tsx @@ -0,0 +1,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'; |