mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
disclaimer - render via react-markdown
This commit is contained in:
parent
cd21a4b699
commit
5a917431d8
@ -54,6 +54,7 @@
|
|||||||
"react-addons-css-transition-group": "^15.0.2",
|
"react-addons-css-transition-group": "^15.0.2",
|
||||||
"react-dom": "^15.0.2",
|
"react-dom": "^15.0.2",
|
||||||
"react-hyperscript": "^2.2.2",
|
"react-hyperscript": "^2.2.2",
|
||||||
|
"react-markdown": "^2.3.0",
|
||||||
"react-redux": "^4.4.5",
|
"react-redux": "^4.4.5",
|
||||||
"react-tooltip-component": "^0.3.0",
|
"react-tooltip-component": "^0.3.0",
|
||||||
"readable-stream": "^2.1.2",
|
"readable-stream": "^2.1.2",
|
||||||
|
@ -3,6 +3,7 @@ const Component = require('react').Component
|
|||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const connect = require('react-redux').connect
|
const connect = require('react-redux').connect
|
||||||
const actions = require('../actions')
|
const actions = require('../actions')
|
||||||
|
const ReactMarkdown = require('react-markdown')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const disclaimer = fs.readFileSync(path.join(__dirname, '..', '..', '..', 'USER_AGREEMENT.md')).toString()
|
const disclaimer = fs.readFileSync(path.join(__dirname, '..', '..', '..', 'USER_AGREEMENT.md')).toString()
|
||||||
@ -36,14 +37,21 @@ DisclaimerScreen.prototype.render = function () {
|
|||||||
|
|
||||||
h('div', {
|
h('div', {
|
||||||
style: {
|
style: {
|
||||||
whiteSpace: 'pre-line',
|
// whiteSpace: 'pre-line',
|
||||||
background: 'rgb(235, 235, 235)',
|
background: 'rgb(235, 235, 235)',
|
||||||
height: '310px',
|
height: '310px',
|
||||||
padding: '6px',
|
padding: '6px',
|
||||||
width: '80%',
|
width: '80%',
|
||||||
overflowY: 'scroll',
|
overflowY: 'scroll',
|
||||||
},
|
},
|
||||||
}, disclaimer),
|
}, [
|
||||||
|
|
||||||
|
h(ReactMarkdown, {
|
||||||
|
source: disclaimer,
|
||||||
|
skipHtml: true,
|
||||||
|
}),
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
h('button', {
|
h('button', {
|
||||||
style: { marginTop: '18px' },
|
style: { marginTop: '18px' },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user