diff options
author | Thomas <thomas.b.huang@gmail.com> | 2018-05-17 13:44:51 +0800 |
---|---|---|
committer | Thomas <thomas.b.huang@gmail.com> | 2018-05-17 13:44:51 +0800 |
commit | d9be7f989a86e3fdfd83e4c632fd08cefd8309e5 (patch) | |
tree | bbfeb7098997244ce7e8ce28e896faa2dfb6bb6e /ui/app/components/loading-screen/loading-screen.component.js | |
parent | 06e25205b200b976e286c670cc5e703439dab05c (diff) | |
parent | f441153211c7920573f8bfb699bfda1b6de7efe9 (diff) | |
download | tangerine-wallet-browser-d9be7f989a86e3fdfd83e4c632fd08cefd8309e5.tar.gz tangerine-wallet-browser-d9be7f989a86e3fdfd83e4c632fd08cefd8309e5.tar.zst tangerine-wallet-browser-d9be7f989a86e3fdfd83e4c632fd08cefd8309e5.zip |
Merge branch 'testing' of https://github.com/tmashuang/metamask-extension into testing
Diffstat (limited to 'ui/app/components/loading-screen/loading-screen.component.js')
-rw-r--r-- | ui/app/components/loading-screen/loading-screen.component.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ui/app/components/loading-screen/loading-screen.component.js b/ui/app/components/loading-screen/loading-screen.component.js new file mode 100644 index 000000000..bce2a4aac --- /dev/null +++ b/ui/app/components/loading-screen/loading-screen.component.js @@ -0,0 +1,35 @@ +const { Component } = require('react') +const h = require('react-hyperscript') +const PropTypes = require('prop-types') +const classnames = require('classnames') +const Spinner = require('../spinner') + +class LoadingScreen extends Component { + renderMessage () { + const { loadingMessage } = this.props + return loadingMessage && h('span', loadingMessage) + } + + render () { + return ( + h('.loading-overlay', { + className: classnames({ 'loading-overlay--full-screen': this.props.fullScreen }), + }, [ + h('.loading-overlay__container', [ + h(Spinner, { + color: '#F7C06C', + }), + + this.renderMessage(), + ]), + ]) + ) + } +} + +LoadingScreen.propTypes = { + loadingMessage: PropTypes.string, + fullScreen: PropTypes.bool, +} + +module.exports = LoadingScreen |