add params w/ default vals for cp-to-clipboard & updated styles

pull/1/head
Rob Stupay 7 years ago
parent 103f144559
commit 534c9e3e91
  1. 6
      src/app/ui/copy-to-clipboard.js
  2. 2
      src/multiParamManager.js
  3. 1
      src/universal-dapp-styles.js

@ -14,8 +14,8 @@ var css = csjs`
} }
` `
module.exports = function copyToClipboard (getContent) { module.exports = function copyToClipboard (getContent, tip = 'Copy value to to clipboard', icon = 'fa-clipboard') {
var copyIcon = yo`<i title="Copy value to clipboard" class="${css.copyIcon} fa fa-clipboard" aria-hidden="true"></i>` var copyIcon = yo`<i title="${tip}" class="${css.copyIcon} fa ${icon}" aria-hidden="true"></i>`
copyIcon.style.color = styles.remix.icon_Color_CopyToClipboard copyIcon.style.color = styles.remix.icon_Color_CopyToClipboard
copyIcon.onmouseenter = function (event) { copyIcon.style.color = styles.remix.icon_HoverColor_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 } copyIcon.onmouseleave = function (event) { copyIcon.style.color = styles.remix.icon_Color_CopyToClipboard }
@ -29,7 +29,7 @@ module.exports = function copyToClipboard (getContent) {
} }
} catch (e) {} } catch (e) {}
copy(copiableContent) copy(copiableContent)
addTooltip('Successfully copied!') addTooltip(tip)
} }
} }
return copyIcon return copyIcon

@ -154,7 +154,7 @@ class MultiParamManager {
var multiString = this.getMultiValsString() var multiString = this.getMultiValsString()
var multiJSON = JSON.parse('[' + multiString + ']') var multiJSON = JSON.parse('[' + multiString + ']')
return txFormat.encodeData(this.funABI, multiJSON) return txFormat.encodeData(this.funABI, multiJSON)
})} }, 'Encode values of input fields & copy to clipboard', 'fa-briefcase')}
</div> </div>
</div> </div>
</div>` </div>`

@ -241,6 +241,7 @@ var css = csjs`
padding-right: 26px; padding-right: 26px;
padding-top: 5px; padding-top: 5px;
float: right; float: right;
font-size: 16px;
} }
` `

Loading…
Cancel
Save