From a29b13789d03abbf319f6754b143945a0c8819c6 Mon Sep 17 00:00:00 2001 From: Vasek Mlejnsky Date: Wed, 5 Sep 2018 13:01:28 +0200 Subject: [PATCH] Fix tooltip in AccountSummary --- src/components/Tooltip/index.js | 13 ++++++++-- .../Wallet/views/AccountSummary/index.js | 26 ++++++++++++------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/components/Tooltip/index.js b/src/components/Tooltip/index.js index f405670d..656c0b19 100644 --- a/src/components/Tooltip/index.js +++ b/src/components/Tooltip/index.js @@ -173,9 +173,17 @@ const Wrapper = styled.div` class Tooltip extends Component { render() { - const { placement, content, children } = this.props; + const { + className, + placement, + content, + children, + } = this.props; return ( - { this.tooltipContainerRef = node; }}> + { this.tooltipContainerRef = node; }} + > this.tooltipContainerRef} arrowContent={
} @@ -190,6 +198,7 @@ class Tooltip extends Component { } Tooltip.propTypes = { + className: PropTypes.string, placement: PropTypes.string, children: PropTypes.oneOfType([ PropTypes.element, diff --git a/src/views/Wallet/views/AccountSummary/index.js b/src/views/Wallet/views/AccountSummary/index.js index cccb7d25..1996fc99 100644 --- a/src/views/Wallet/views/AccountSummary/index.js +++ b/src/views/Wallet/views/AccountSummary/index.js @@ -7,7 +7,7 @@ import Icon from 'components/Icon'; import { AsyncSelect } from 'components/Select'; import ICONS from 'config/icons'; import colors from 'config/colors'; -import Tooltip from 'rc-tooltip'; +import Tooltip from 'components/Tooltip'; import CoinLogo from 'components/images/CoinLogo'; import * as stateUtils from 'reducers/utils'; @@ -25,10 +25,17 @@ const AccountHeading = styled.div` align-items: center; `; -const StyledH2 = styled(H2)` +const H2Wrapper = styled.div` + display: flex; + align-items: center; padding: 20px 48px; `; +const StyledTooltip = styled(Tooltip)` + position: relative; + top: 2px; +`; + const AccountName = styled.div` display: flex; align-items: center; @@ -93,24 +100,23 @@ const AccountSummary = (props: Props) => { localStorage={props.localStorage} /> - - Tokens - } - overlay={( + +

Tokens

+ Insert token name, symbol or address to be able to send it. )} - placement="top" > -
-
+ + {/* 0x58cda554935e4a1f2acbe15f8757400af275e084 Lahod */} {/* 0x58cda554935e4a1f2acbe15f8757400af275e084 T01 */}