summaryrefslogtreecommitdiff
path: root/animism-align/frontend/common/copyToClipboardButton.component.js
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/common/copyToClipboardButton.component.js')
-rw-r--r--animism-align/frontend/common/copyToClipboardButton.component.js24
1 files changed, 0 insertions, 24 deletions
diff --git a/animism-align/frontend/common/copyToClipboardButton.component.js b/animism-align/frontend/common/copyToClipboardButton.component.js
deleted file mode 100644
index cfe7103..0000000
--- a/animism-align/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>
- )
- }
-}