From db90d7cb5aef57e6af0ce969b029bc07d7d8251d Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 26 Feb 2019 13:32:47 -0300 Subject: [PATCH] popover fixes --- .../molecules/AccountStatus/Indicator.tsx | 6 ++++-- src/components/molecules/AccountStatus/Popover.tsx | 14 ++++++++++++-- src/components/molecules/AccountStatus/index.tsx | 8 +++++++- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/components/molecules/AccountStatus/Indicator.tsx b/src/components/molecules/AccountStatus/Indicator.tsx index 0a75427..66d014f 100644 --- a/src/components/molecules/AccountStatus/Indicator.tsx +++ b/src/components/molecules/AccountStatus/Indicator.tsx @@ -5,15 +5,17 @@ import styles from './Indicator.module.scss' const Indicator = ({ className, - showPopover + showPopover, + hidePopover }: { className?: string showPopover: any + hidePopover: any }) => (
{states => diff --git a/src/components/molecules/AccountStatus/Popover.tsx b/src/components/molecules/AccountStatus/Popover.tsx index 0d85c17..16fb41b 100644 --- a/src/components/molecules/AccountStatus/Popover.tsx +++ b/src/components/molecules/AccountStatus/Popover.tsx @@ -3,8 +3,18 @@ import { User } from '../../../context/User' import Faucet from './Faucet' import styles from './Popover.module.scss' -const Popover = () => ( -
+const Popover = ({ + showPopover, + hidePopover +}: { + showPopover: any + hidePopover: any +}) => ( +
{states => diff --git a/src/components/molecules/AccountStatus/index.tsx b/src/components/molecules/AccountStatus/index.tsx index 446e265..245b611 100644 --- a/src/components/molecules/AccountStatus/index.tsx +++ b/src/components/molecules/AccountStatus/index.tsx @@ -31,13 +31,19 @@ export default class AccountStatus extends PureComponent< enterExitTransitionDurationMs: 300, tipSize: 0.01, onOuterAction: () => this.togglePopover(false), - body: + body: ( + this.togglePopover(true)} + hidePopover={() => this.togglePopover(false)} + /> + ) } return ( this.togglePopover(true)} + hidePopover={() => this.togglePopover(false)} className={this.props.className} />