From d44a6e315965e5f5267cad0cdb4963aab132215a Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Mon, 18 Feb 2019 14:54:29 +0100 Subject: [PATCH] Add clipboard tooltip --- app/src/components/BrokerStatistics.tsx | 1 - app/src/components/Copy.tsx | 40 ++++++++++++++----------- app/src/components/Settings.tsx | 1 + 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/app/src/components/BrokerStatistics.tsx b/app/src/components/BrokerStatistics.tsx index 7e7dba3..48f5c33 100644 --- a/app/src/components/BrokerStatistics.tsx +++ b/app/src/components/BrokerStatistics.tsx @@ -24,7 +24,6 @@ const styles: StyleRulesCallback = theme => ({ height: '224px', backgroundColor: 'rebeccapurple', marginBottom: 0, - marginTop: 'auto', padding: '8px', }, }) diff --git a/app/src/components/Copy.tsx b/app/src/components/Copy.tsx index e92525c..0597a27 100644 --- a/app/src/components/Copy.tsx +++ b/app/src/components/Copy.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { Snackbar, SnackbarContent } from '@material-ui/core' +import { Snackbar, SnackbarContent, Tooltip } from '@material-ui/core' import FileCopy from '@material-ui/icons/FileCopy' import Check from '@material-ui/icons/Check' import green from '@material-ui/core/colors/green' @@ -35,25 +35,29 @@ class Copy extends React.Component { ? : - return - {icon} + return ( - { this.setState({ snackBarOpen: false }) }} - > - - + + {icon} + + + { this.setState({ snackBarOpen: false }) }} + > + + + - + ) } private handleClick = (event: React.MouseEvent) => { diff --git a/app/src/components/Settings.tsx b/app/src/components/Settings.tsx index 657e8a4..543a861 100644 --- a/app/src/components/Settings.tsx +++ b/app/src/components/Settings.tsx @@ -11,6 +11,7 @@ import { Select, Typography, Switch, + Tooltip, } from '@material-ui/core' import { StyleRulesCallback, withStyles } from '@material-ui/core/styles'