Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/prevent-css-leakage

This commit is contained in:
fragosti
2018-11-08 11:04:16 -08:00
29 changed files with 505 additions and 339 deletions

View File

@@ -1,17 +1,18 @@
import { darken } from 'polished';
import { MediaChoice, stylesForMedia } from '../../style/media';
import { ColorOption, styled } from '../../style/theme';
import { cssRuleIfExists } from '../../style/util';
export interface ContainerProps {
display?: string;
display?: MediaChoice;
position?: string;
top?: string;
right?: string;
bottom?: string;
left?: string;
width?: string;
height?: string;
width?: MediaChoice;
height?: MediaChoice;
maxWidth?: string;
margin?: string;
marginTop?: string;
@@ -33,6 +34,7 @@ export interface ContainerProps {
cursor?: string;
overflow?: string;
darkenOnHover?: boolean;
flexGrow?: string | number;
}
export const Container =
@@ -42,14 +44,12 @@ export const Container =
&& {
all: initial;
box-sizing: border-box;
${props => cssRuleIfExists(props, 'display')}
${props => cssRuleIfExists(props, 'flex-grow')}
${props => cssRuleIfExists(props, 'position')}
${props => cssRuleIfExists(props, 'top')}
${props => cssRuleIfExists(props, 'right')}
${props => cssRuleIfExists(props, 'bottom')}
${props => cssRuleIfExists(props, 'left')}
${props => cssRuleIfExists(props, 'width')}
${props => cssRuleIfExists(props, 'height')}
${props => cssRuleIfExists(props, 'max-width')}
${props => cssRuleIfExists(props, 'margin')}
${props => cssRuleIfExists(props, 'margin-top')}
@@ -67,6 +67,9 @@ export const Container =
${props => cssRuleIfExists(props, 'cursor')}
${props => cssRuleIfExists(props, 'overflow')}
${props => (props.hasBoxShadow ? `box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1)` : '')};
${props => props.display && stylesForMedia('display', props.display)}
${props => (props.width ? stylesForMedia('width', props.width) : '')}
${props => (props.height ? stylesForMedia('height', props.height) : '')}
background-color: ${props => (props.backgroundColor ? props.theme[props.backgroundColor] : 'none')};
border-color: ${props => (props.borderColor ? props.theme[props.borderColor] : 'none')};
&:hover {