Add clipboard tooltip
This commit is contained in:
@@ -24,7 +24,6 @@ const styles: StyleRulesCallback = theme => ({
|
||||
height: '224px',
|
||||
backgroundColor: 'rebeccapurple',
|
||||
marginBottom: 0,
|
||||
marginTop: 'auto',
|
||||
padding: '8px',
|
||||
},
|
||||
})
|
||||
|
||||
@@ -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,8 +35,11 @@ class Copy extends React.Component<Props, State> {
|
||||
? <FileCopy fontSize="inherit" style={{ cursor: 'pointer' }} onClick={this.handleClick} />
|
||||
: <Check fontSize="inherit" style={{ cursor: 'default' }} />
|
||||
|
||||
return <span>
|
||||
return (
|
||||
<span>
|
||||
<Tooltip placement="top" title="Copy to clipboard">
|
||||
<span style={{ fontSize: '16px' }}>{icon}</span>
|
||||
</Tooltip>
|
||||
<span>
|
||||
<Snackbar
|
||||
anchorOrigin={{
|
||||
@@ -54,6 +57,7 @@ class Copy extends React.Component<Props, State> {
|
||||
</Snackbar>
|
||||
</span>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
private handleClick = (event: React.MouseEvent) => {
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
Select,
|
||||
Typography,
|
||||
Switch,
|
||||
Tooltip,
|
||||
} from '@material-ui/core'
|
||||
import { StyleRulesCallback, withStyles } from '@material-ui/core/styles'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user