@ -1,4 +1,5 @@
var yo = require ( 'yo-yo' )
var yo = require ( 'yo-yo' )
const copy = require ( 'clipboard-copy' )
// -------------- styling ----------------------
// -------------- styling ----------------------
var csjs = require ( 'csjs-inject' )
var csjs = require ( 'csjs-inject' )
@ -38,12 +39,26 @@ var css = csjs`
display : block ;
display : block ;
margin : 4 em 0 2 em 0 ;
margin : 4 em 0 2 em 0 ;
}
}
. copyaddress {
color : # C6CFF7 ;
margin - right : 0.2 em ;
margin - top : 0.3 em ;
cursor : pointer ;
}
. selectAddress extends $ { styles . dropdown } {
width : 73.5 % ;
float : left ;
text - align : center ;
}
`
`
module . exports = contractTab
module . exports = contractTab
function contractTab ( ) {
function contractTab ( ) {
return yo `
function copyAddress ( ) {
copy ( document . querySelector ( '#envView #txorigin' ) . value )
}
var el = yo `
< div class = "${css.contractTabView}" id = "envView" >
< div class = "${css.contractTabView}" id = "envView" >
< div class = "${css.crow}" >
< div class = "${css.crow}" >
< div id = "selectExEnv" class = "${css.col1_1}" >
< div id = "selectExEnv" class = "${css.col1_1}" >
@ -73,7 +88,7 @@ function contractTab () {
< / d i v >
< / d i v >
< div class = "${css.crow}" >
< div class = "${css.crow}" >
< div class = "${css.col1_1}" > Transaction origin < / d i v >
< div class = "${css.col1_1}" > Transaction origin < / d i v >
< select name = "txorigin" class = "${css.select}" id = "txorigin" > < / s e l e c t >
< i title = "Copy Address" class = "copytxorigin fa fa-clipboard ${css.copyaddress}" onclick = $ { copyAddress } aria - hidden = "true" > < / i > < s e l e c t n a m e = " t x o r i g i n " c l a s s = " $ { c s s . s e l e c t A d d r e s s } " i d = " t x o r i g i n " > < / s e l e c t >
< / d i v >
< / d i v >
< div class = "${css.crow}" >
< div class = "${css.crow}" >
< div class = "${css.col1_1}" > Transaction gas limit < / d i v >
< div class = "${css.col1_1}" > Transaction gas limit < / d i v >
@ -90,4 +105,5 @@ function contractTab () {
< div id = "output" class = "${css.contract}" > < / d i v >
< div id = "output" class = "${css.contract}" > < / d i v >
< / d i v >
< / d i v >
`
`
return el
}
}