diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-05-01 09:28:34 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-05-01 09:58:37 +0800 |
commit | ffda954add95fc17049cd0f5386952dabfc4168b (patch) | |
tree | 01d10afc74b16872f7b189d7c3177714564ad47b /ui/app/components/loading-screen | |
parent | 21349dd612f1eed0e4f97e4ebf27bed05d5b8992 (diff) | |
download | tangerine-wallet-browser-ffda954add95fc17049cd0f5386952dabfc4168b.tar tangerine-wallet-browser-ffda954add95fc17049cd0f5386952dabfc4168b.tar.gz tangerine-wallet-browser-ffda954add95fc17049cd0f5386952dabfc4168b.tar.bz2 tangerine-wallet-browser-ffda954add95fc17049cd0f5386952dabfc4168b.tar.lz tangerine-wallet-browser-ffda954add95fc17049cd0f5386952dabfc4168b.tar.xz tangerine-wallet-browser-ffda954add95fc17049cd0f5386952dabfc4168b.tar.zst tangerine-wallet-browser-ffda954add95fc17049cd0f5386952dabfc4168b.zip |
Fix styling of the app spinner
Diffstat (limited to 'ui/app/components/loading-screen')
-rw-r--r-- | ui/app/components/loading-screen/index.js | 2 | ||||
-rw-r--r-- | ui/app/components/loading-screen/loading-screen.component.js | 35 |
2 files changed, 37 insertions, 0 deletions
diff --git a/ui/app/components/loading-screen/index.js b/ui/app/components/loading-screen/index.js new file mode 100644 index 000000000..191d953f7 --- /dev/null +++ b/ui/app/components/loading-screen/index.js @@ -0,0 +1,2 @@ +const LoadingScreen = require('./loading-screen.component') +module.exports = LoadingScreen 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 |