1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-04 15:14:29 +01:00
metamask-extension/ui/app/components/loading-screen/loading-screen.component.js

32 lines
652 B
JavaScript
Raw Normal View History

const { Component } = require('react')
const h = require('react-hyperscript')
const PropTypes = require('prop-types')
2018-05-01 03:28:34 +02:00
const Spinner = require('../spinner')
2018-05-01 03:28:34 +02:00
class LoadingScreen extends Component {
renderMessage () {
const { loadingMessage } = this.props
return loadingMessage && h('span', loadingMessage)
}
render () {
return (
h('.loading-overlay', [
2018-05-01 03:28:34 +02:00
h('.loading-overlay__container', [
h(Spinner, {
color: '#F7C06C',
2018-04-18 09:56:52 +02:00
}),
2018-04-18 09:56:52 +02:00
this.renderMessage(),
]),
])
)
}
}
2018-05-01 03:28:34 +02:00
LoadingScreen.propTypes = {
2017-11-02 03:30:33 +01:00
loadingMessage: PropTypes.string,
}
2018-05-01 03:28:34 +02:00
module.exports = LoadingScreen