diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-11-10 07:43:03 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-11-10 07:43:03 +0800 |
commit | b1376059d348cd284baa541421fe850fe196f6d7 (patch) | |
tree | 326c258c6d112f051e6dac8bb4e19421cd4850a2 /packages/instant/src/components | |
parent | 2bba01c664efb52d3213be54544ef9d9cea0f82f (diff) | |
parent | 2c585bfbdc4940e3e6089ac1cf595dd009b141d2 (diff) | |
download | dexon-sol-tools-b1376059d348cd284baa541421fe850fe196f6d7.tar dexon-sol-tools-b1376059d348cd284baa541421fe850fe196f6d7.tar.gz dexon-sol-tools-b1376059d348cd284baa541421fe850fe196f6d7.tar.bz2 dexon-sol-tools-b1376059d348cd284baa541421fe850fe196f6d7.tar.lz dexon-sol-tools-b1376059d348cd284baa541421fe850fe196f6d7.tar.xz dexon-sol-tools-b1376059d348cd284baa541421fe850fe196f6d7.tar.zst dexon-sol-tools-b1376059d348cd284baa541421fe850fe196f6d7.zip |
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/metamask-connect-flow
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r-- | packages/instant/src/components/ui/overlay.tsx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/instant/src/components/ui/overlay.tsx b/packages/instant/src/components/ui/overlay.tsx index c5f55f9c0..f67d6fb2f 100644 --- a/packages/instant/src/components/ui/overlay.tsx +++ b/packages/instant/src/components/ui/overlay.tsx @@ -1,11 +1,15 @@ import * as _ from 'lodash'; -import { overlayBlack, styled } from '../../style/theme'; +import { generateMediaWrapper, ScreenWidths } from '../../style/media'; +import { generateOverlayBlack, styled } from '../../style/theme'; import { zIndex } from '../../style/z_index'; export interface OverlayProps { zIndex?: number; backgroundColor?: string; + width?: string; + height?: string; + showMaxWidth?: ScreenWidths; } export const Overlay = @@ -20,12 +24,16 @@ export const Overlay = left: 0; z-index: ${props => props.zIndex} background-color: ${props => props.backgroundColor}; + ${props => props.width && `width: ${props.width};`} + ${props => props.height && `height: ${props.height};`} + display: ${props => (props.showMaxWidth ? 'none' : 'block')}; + ${props => props.showMaxWidth && generateMediaWrapper(props.showMaxWidth)`display: block;`} } `; Overlay.defaultProps = { zIndex: zIndex.overlayDefault, - backgroundColor: overlayBlack, + backgroundColor: generateOverlayBlack(0.6), }; Overlay.displayName = 'Overlay'; |