fix(instant): Progress bar background color should be 10% primary color
This commit is contained in:
@@ -27,6 +27,7 @@ export interface ContainerProps {
|
||||
borderBottom?: string;
|
||||
className?: string;
|
||||
backgroundColor?: ColorOption;
|
||||
rawBackgroundColor?: string;
|
||||
hasBoxShadow?: boolean;
|
||||
zIndex?: number;
|
||||
whiteSpace?: string;
|
||||
@@ -38,6 +39,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 >
|
||||
@@ -70,7 +81,7 @@ export const Container =
|
||||
${props => props.width && stylesForMedia<string>('width', props.width)}
|
||||
${props => props.height && stylesForMedia<string>('height', props.height)}
|
||||
${props => props.borderRadius && stylesForMedia<string>('border-radius', props.borderRadius)}
|
||||
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