|
|
@ -2,6 +2,7 @@ const Component = require('react').Component |
|
|
|
const h = require('react-hyperscript') |
|
|
|
const h = require('react-hyperscript') |
|
|
|
const inherits = require('util').inherits |
|
|
|
const inherits = require('util').inherits |
|
|
|
const ethUtil = require('ethereumjs-util') |
|
|
|
const ethUtil = require('ethereumjs-util') |
|
|
|
|
|
|
|
const extend = require('xtend') |
|
|
|
|
|
|
|
|
|
|
|
module.exports = BinaryRenderer |
|
|
|
module.exports = BinaryRenderer |
|
|
|
|
|
|
|
|
|
|
@ -12,20 +13,22 @@ function BinaryRenderer () { |
|
|
|
|
|
|
|
|
|
|
|
BinaryRenderer.prototype.render = function () { |
|
|
|
BinaryRenderer.prototype.render = function () { |
|
|
|
const props = this.props |
|
|
|
const props = this.props |
|
|
|
const { value } = props |
|
|
|
const { value, style } = props |
|
|
|
const text = this.hexToText(value) |
|
|
|
const text = this.hexToText(value) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const defaultStyle = extend({ |
|
|
|
|
|
|
|
width: '315px', |
|
|
|
|
|
|
|
maxHeight: '210px', |
|
|
|
|
|
|
|
resize: 'none', |
|
|
|
|
|
|
|
border: 'none', |
|
|
|
|
|
|
|
background: 'white', |
|
|
|
|
|
|
|
padding: '3px', |
|
|
|
|
|
|
|
}, style) |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
h('textarea.font-small', { |
|
|
|
h('textarea.font-small', { |
|
|
|
readOnly: true, |
|
|
|
readOnly: true, |
|
|
|
style: { |
|
|
|
style: defaultStyle, |
|
|
|
width: '315px', |
|
|
|
|
|
|
|
maxHeight: '210px', |
|
|
|
|
|
|
|
resize: 'none', |
|
|
|
|
|
|
|
border: 'none', |
|
|
|
|
|
|
|
background: 'white', |
|
|
|
|
|
|
|
padding: '3px', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
defaultValue: text, |
|
|
|
defaultValue: text, |
|
|
|
}) |
|
|
|
}) |
|
|
|
) |
|
|
|
) |
|
|
|