mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
review comments
This commit is contained in:
parent
2d66870773
commit
fd67844235
@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import {Badge, Tooltip} from "reactstrap";
|
import {Badge, Tooltip} from "reactstrap";
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import {CopyToClipboard} from 'react-copy-to-clipboard';
|
import {CopyToClipboard} from 'react-copy-to-clipboard';
|
||||||
|
import FontAwesome from 'react-fontawesome';
|
||||||
import uuid from 'uuid/v1';
|
import uuid from 'uuid/v1';
|
||||||
|
|
||||||
import './CopyButton.css';
|
import './CopyButton.css';
|
||||||
@ -23,7 +24,7 @@ class CopyButton extends React.Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
showCopied: true
|
showCopied: true
|
||||||
});
|
});
|
||||||
// Hide the tooltip after a few seconds
|
// Hide the tooltip after 1.5s
|
||||||
clearTimeout(this.showTimeout);
|
clearTimeout(this.showTimeout);
|
||||||
this.showTimeout = setTimeout(() => {
|
this.showTimeout = setTimeout(() => {
|
||||||
this.setState({showCopied: false});
|
this.setState({showCopied: false});
|
||||||
@ -35,9 +36,9 @@ class CopyButton extends React.Component {
|
|||||||
return (<CopyToClipboard text={text}
|
return (<CopyToClipboard text={text}
|
||||||
onCopy={() => this.onCopy()}
|
onCopy={() => this.onCopy()}
|
||||||
title={title}>
|
title={title}>
|
||||||
<Badge className={classNames('copy-to-clipboard', 'p-' + (size ? size : 3))}
|
<Badge className={classNames('copy-to-clipboard', 'p-' + (size || 3))}
|
||||||
color="primary" id={'copy-button-' + this.id}>
|
color="primary" id={'copy-button-' + this.id}>
|
||||||
<i className="fa fa-copy"/>
|
<FontAwesome name="copy"/>
|
||||||
{this.state.showCopied &&
|
{this.state.showCopied &&
|
||||||
<Tooltip isOpen={true} target={'copy-button-' + this.id}>
|
<Tooltip isOpen={true} target={'copy-button-' + this.id}>
|
||||||
Copied to clipboard
|
Copied to clipboard
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.react-json-view {
|
.react-json-view {
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user