fix(instant): Half opacity instead of darkening on hover for clickable text

This commit is contained in:
Steve Klebanoff
2018-11-28 10:25:04 -08:00
parent 53f8e1b3b4
commit 1b23c430fc

View File

@@ -31,7 +31,7 @@ export const Text: React.StatelessComponent<TextProps> = ({ href, onClick, ...re
return <StyledText {...rest} onClick={computedOnClick} />;
};
const darkenOnHoverAmount = 0.3;
const opacityOnHoverAmount = 0.5;
export const StyledText =
styled.div <
TextProps >
@@ -56,8 +56,7 @@ export const StyledText =
${props => (props.textAlign ? `text-align: ${props.textAlign}` : '')};
${props => (props.width ? `width: ${props.width}` : '')};
&:hover {
${props =>
props.onClick ? `color: ${darken(darkenOnHoverAmount, props.theme[props.fontColor || 'white'])}` : ''};
${props => (props.onClick ? `opacity: ${opacityOnHoverAmount};` : '')};
}
}
`;