CopyToClipboard: remove tooltip

This commit is contained in:
Jannis R 2016-11-14 11:39:36 +01:00
parent 522b7108f9
commit e9e9475830
No known key found for this signature in database
GPG Key ID: 0FE83946296A88A5
2 changed files with 6 additions and 7 deletions

View File

@ -15,6 +15,10 @@
/* along with Parity. If not, see <http://www.gnu.org/licenses/>.
*/
.wrapper {
display: inline-block;
}
.data {
font-family: monospace;
}

View File

@ -28,7 +28,6 @@ import styles from './copyToClipboard.css';
export default class CopyToClipboard extends Component {
static propTypes = {
data: PropTypes.string.isRequired,
label: PropTypes.string,
onCopy: PropTypes.func,
size: PropTypes.number, // in px
cooldown: PropTypes.number // in ms
@ -36,7 +35,6 @@ export default class CopyToClipboard extends Component {
static defaultProps = {
className: '',
label: 'copy to clipboard',
onCopy: () => {},
size: 16,
cooldown: 1000
@ -55,12 +53,12 @@ export default class CopyToClipboard extends Component {
}
render () {
const { data, label, size } = this.props;
const { data, size } = this.props;
const { copied } = this.state;
return (
<Clipboard onCopy={ this.onCopy } text={ data }>
<div>
<div className={ styles.wrapper }>
<Snackbar
open={ copied }
message={
@ -70,10 +68,7 @@ export default class CopyToClipboard extends Component {
bodyStyle={ { backgroundColor: darkBlack } }
/>
<IconButton
tooltip={ copied ? 'done!' : label }
disableTouchRipple
tooltipPosition={ 'top-right' }
tooltipStyles={ { marginTop: `-${size / 4}px` } }
style={ { width: size, height: size, padding: '0' } }
iconStyle={ { width: size, height: size } }
>