A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ciphermask/ui/app/components/copyButton.js

27 lines
623 B

const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const copyToClipboard = require('copy-to-clipboard')
module.exports = CopyButton
inherits(CopyButton, Component)
function CopyButton () {
Component.call(this)
}
CopyButton.prototype.render = function () {
const props = this.props
const value = props.value
return h('img.cursor-pointer.color-orange', {
src: 'images/copy.svg',
title: 'Copy Address',
onClick: (event) => {
event.preventDefault()
event.stopPropagation()
copyToClipboard(value)
},
})
}