Merge branch 'development' of https://github.com/0xProject/0x-monorepo into fix/instant/instant-bounces-on-error
This commit is contained in:
@@ -27,6 +27,7 @@ export interface ContainerProps {
|
||||
borderBottom?: string;
|
||||
className?: string;
|
||||
backgroundColor?: ColorOption;
|
||||
rawBackgroundColor?: string;
|
||||
hasBoxShadow?: boolean;
|
||||
isHidden?: boolean;
|
||||
zIndex?: number;
|
||||
@@ -39,6 +40,16 @@ export interface ContainerProps {
|
||||
flexGrow?: string | number;
|
||||
}
|
||||
|
||||
const getBackgroundColor = (theme: any, backgroundColor?: ColorOption, rawBackgroundColor?: string): string => {
|
||||
if (backgroundColor) {
|
||||
return theme[backgroundColor] as string;
|
||||
}
|
||||
if (rawBackgroundColor) {
|
||||
return rawBackgroundColor;
|
||||
}
|
||||
return 'none';
|
||||
};
|
||||
|
||||
export const Container =
|
||||
styled.div <
|
||||
ContainerProps >
|
||||
@@ -72,7 +83,7 @@ export const Container =
|
||||
${props => props.height && stylesForMedia<string>('height', props.height)}
|
||||
${props => props.borderRadius && stylesForMedia<string>('border-radius', props.borderRadius)}
|
||||
${props => (props.isHidden ? 'visibility: hidden;' : '')}
|
||||
background-color: ${props => (props.backgroundColor ? props.theme[props.backgroundColor] : 'none')};
|
||||
background-color: ${props => getBackgroundColor(props.theme, props.backgroundColor, props.rawBackgroundColor)};
|
||||
border-color: ${props => (props.borderColor ? props.theme[props.borderColor] : 'none')};
|
||||
&:hover {
|
||||
${props =>
|
||||
|
Reference in New Issue
Block a user