From 479aafd0761641d3aad7edc6f214b994a310168c Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Thu, 4 Oct 2018 14:06:25 +0200 Subject: [PATCH] feat(utils/converter): introduce copy-to-clipboard buttons This commit enables users to easily copy values from the converter's inputs to the clipboard. --- embark-ui/src/components/Converter.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/embark-ui/src/components/Converter.js b/embark-ui/src/components/Converter.js index d9d0f39f..63eb0c82 100644 --- a/embark-ui/src/components/Converter.js +++ b/embark-ui/src/components/Converter.js @@ -1,6 +1,7 @@ import React, {Component} from 'react'; -import {Page, Form} from "tabler-react"; +import {Page, Form, Icon, Button} from "tabler-react"; import Units from 'ethereumjs-units'; +import {CopyToClipboard} from 'react-copy-to-clipboard'; const UNITS = [ { key: 'wei', name: 'Wei' }, @@ -55,7 +56,13 @@ class Converter extends Component { UNITS.map(unit => { return ( - this.calculate(e.target.value, unit.key)} /> + + this.calculate(e.target.value, unit.key)} /> + + + + + ) })