aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/ui/icon.tsx
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-07 07:59:16 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-07 07:59:16 +0800
commit10da1e24e13b728c2837e5360a48fcb2913855a5 (patch)
tree6e2421617a5ac499ea1224ba50b99120dc6b2ca0 /packages/instant/src/components/ui/icon.tsx
parent42c441fafa0a0c2de45904a2f67293152dd954b2 (diff)
downloaddexon-0x-contracts-10da1e24e13b728c2837e5360a48fcb2913855a5.tar.gz
dexon-0x-contracts-10da1e24e13b728c2837e5360a48fcb2913855a5.tar.zst
dexon-0x-contracts-10da1e24e13b728c2837e5360a48fcb2913855a5.zip
feat: make instant resistant to external styles
Diffstat (limited to 'packages/instant/src/components/ui/icon.tsx')
-rw-r--r--packages/instant/src/components/ui/icon.tsx20
1 files changed, 11 insertions, 9 deletions
diff --git a/packages/instant/src/components/ui/icon.tsx b/packages/instant/src/components/ui/icon.tsx
index 94ea26900..2679dad1a 100644
--- a/packages/instant/src/components/ui/icon.tsx
+++ b/packages/instant/src/components/ui/icon.tsx
@@ -101,15 +101,17 @@ const PlainIcon: React.StatelessComponent<IconProps> = props => {
};
export const Icon = withTheme(styled(PlainIcon)`
- cursor: ${props => (!_.isUndefined(props.onClick) ? 'pointer' : 'default')};
- transition: opacity 0.5s ease;
- padding: ${props => props.padding};
- opacity: ${props => (!_.isUndefined(props.onClick) ? 0.7 : 1)};
- &:hover {
- opacity: 1;
- }
- &:active {
- opacity: 1;
+ && {
+ cursor: ${props => (!_.isUndefined(props.onClick) ? 'pointer' : 'default')};
+ transition: opacity 0.5s ease;
+ padding: ${props => props.padding};
+ opacity: ${props => (!_.isUndefined(props.onClick) ? 0.7 : 1)};
+ &:hover {
+ opacity: 1;
+ }
+ &:active {
+ opacity: 1;
+ }
}
`);