diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-09-26 14:56:02 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-09-26 14:56:02 +0200 |
| commit | a17b76ac75f506f5da6fe8adf9c36632b60d4226 (patch) | |
| tree | abb0af0c4409b830dea2ef808c146223ee973933 /frontend/common/copyToClipboardButton.component.js | |
| parent | 2231a6e1c05b07bb7ec5906716aedec93d02429c (diff) | |
refactor to use app-rooted js imports
Diffstat (limited to 'frontend/common/copyToClipboardButton.component.js')
| -rw-r--r-- | frontend/common/copyToClipboardButton.component.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/frontend/common/copyToClipboardButton.component.js b/frontend/common/copyToClipboardButton.component.js deleted file mode 100644 index cfe7103..0000000 --- a/frontend/common/copyToClipboardButton.component.js +++ /dev/null @@ -1,24 +0,0 @@ -import React, { Component } from 'react'; -import { writeToClipboard } from '../util' - -export default class CopyToClipboardButton extends Component { - state = { - copied: false, - } - - handleClick() { - writeToClipboard(this.props.data) - this.setState({ copied: true }) - } - - render() { - return ( - <button - className={this.state.copied ? 'copyButton copied' : 'copyButton'} - onClick={this.handleClick.bind(this)} - > - {this.state.copied ? 'Copied!' : 'Copy'} - </button> - ) - } -} |
