From 534c9e3e91d0f44339d7b20c63dd11200ec7c73d Mon Sep 17 00:00:00 2001 From: Rob Stupay Date: Fri, 25 May 2018 16:16:16 +0200 Subject: [PATCH] add params w/ default vals for cp-to-clipboard & updated styles --- src/app/ui/copy-to-clipboard.js | 6 +++--- src/multiParamManager.js | 2 +- src/universal-dapp-styles.js | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/ui/copy-to-clipboard.js b/src/app/ui/copy-to-clipboard.js index 146c1ebc32..2398b62e1a 100644 --- a/src/app/ui/copy-to-clipboard.js +++ b/src/app/ui/copy-to-clipboard.js @@ -14,8 +14,8 @@ var css = csjs` } ` -module.exports = function copyToClipboard (getContent) { - var copyIcon = yo`` +module.exports = function copyToClipboard (getContent, tip = 'Copy value to to clipboard', icon = 'fa-clipboard') { + var copyIcon = yo`` copyIcon.style.color = styles.remix.icon_Color_CopyToClipboard copyIcon.onmouseenter = function (event) { copyIcon.style.color = styles.remix.icon_HoverColor_CopyToClipboard } copyIcon.onmouseleave = function (event) { copyIcon.style.color = styles.remix.icon_Color_CopyToClipboard } @@ -29,7 +29,7 @@ module.exports = function copyToClipboard (getContent) { } } catch (e) {} copy(copiableContent) - addTooltip('Successfully copied!') + addTooltip(tip) } } return copyIcon diff --git a/src/multiParamManager.js b/src/multiParamManager.js index fe91f5d978..6659c22b8f 100644 --- a/src/multiParamManager.js +++ b/src/multiParamManager.js @@ -154,7 +154,7 @@ class MultiParamManager { var multiString = this.getMultiValsString() var multiJSON = JSON.parse('[' + multiString + ']') return txFormat.encodeData(this.funABI, multiJSON) - })} + }, 'Encode values of input fields & copy to clipboard', 'fa-briefcase')} ` diff --git a/src/universal-dapp-styles.js b/src/universal-dapp-styles.js index 3ccca94d34..7deda5b3dc 100644 --- a/src/universal-dapp-styles.js +++ b/src/universal-dapp-styles.js @@ -241,6 +241,7 @@ var css = csjs` padding-right: 26px; padding-top: 5px; float: right; + font-size: 16px; } `