Merge pull request #1346 from 0xProject/fix/instant/token-selector-hover
[instant] Half opacity on clickable text hover
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { darken } from 'polished';
|
||||
import * as React from 'react';
|
||||
|
||||
import { ColorOption, styled } from '../../style/theme';
|
||||
@@ -31,7 +30,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 +55,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};` : '')};
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
Reference in New Issue
Block a user