Improve personal_sign style

textarea was not resizing the way I'd expected, so made it permanently larger, to accomodate larger messages.
feature/default_network_editable
Dan Finlay 8 years ago
parent 00f1a2d78d
commit 35c05607b0
  1. 15
      ui/app/components/binary-renderer.js
  2. 13
      ui/app/components/pending-personal-msg-details.js

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

@ -40,9 +40,18 @@ PendingMsgDetails.prototype.render = function () {
}),
// message data
h('div', [
h('div', {
style: {
height: '260px',
},
}, [
h('label.font-small', { style: { display: 'block' } }, 'MESSAGE'),
h(BinaryRenderer, { value: data }),
h(BinaryRenderer, {
value: data,
style: {
height: '215px',
},
}),
]),
])

Loading…
Cancel
Save