mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #1215 from MetaMask/ImprovePersonalSignStyle
Improve personal_sign style
This commit is contained in:
commit
f3da24cd04
@ -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)
|
||||||
|
|
||||||
return (
|
const defaultStyle = extend({
|
||||||
h('textarea.font-small', {
|
|
||||||
readOnly: true,
|
|
||||||
style: {
|
|
||||||
width: '315px',
|
width: '315px',
|
||||||
maxHeight: '210px',
|
maxHeight: '210px',
|
||||||
resize: 'none',
|
resize: 'none',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
background: 'white',
|
background: 'white',
|
||||||
padding: '3px',
|
padding: '3px',
|
||||||
},
|
}, style)
|
||||||
|
|
||||||
|
return (
|
||||||
|
h('textarea.font-small', {
|
||||||
|
readOnly: true,
|
||||||
|
style: defaultStyle,
|
||||||
defaultValue: text,
|
defaultValue: text,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -40,9 +40,18 @@ PendingMsgDetails.prototype.render = function () {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
// message data
|
// message data
|
||||||
h('div', [
|
h('div', {
|
||||||
|
style: {
|
||||||
|
height: '260px',
|
||||||
|
},
|
||||||
|
}, [
|
||||||
h('label.font-small', { style: { display: 'block' } }, 'MESSAGE'),
|
h('label.font-small', { style: { display: 'block' } }, 'MESSAGE'),
|
||||||
h(BinaryRenderer, { value: data }),
|
h(BinaryRenderer, {
|
||||||
|
value: data,
|
||||||
|
style: {
|
||||||
|
height: '215px',
|
||||||
|
},
|
||||||
|
}),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user