diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-12-11 11:58:42 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-12-11 11:58:42 +0100 |
commit | a73e183108104192ae17c75a5a60eb3075464476 (patch) | |
tree | bcedf65522520405ab38f2baeac009f563aa5158 /src/components/ui/WebviewLoader/index.js | |
parent | fix countdown state (diff) | |
download | ferdium-app-a73e183108104192ae17c75a5a60eb3075464476.tar.gz ferdium-app-a73e183108104192ae17c75a5a60eb3075464476.tar.zst ferdium-app-a73e183108104192ae17c75a5a60eb3075464476.zip |
Improve webview loader
Diffstat (limited to 'src/components/ui/WebviewLoader/index.js')
-rw-r--r-- | src/components/ui/WebviewLoader/index.js | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/components/ui/WebviewLoader/index.js b/src/components/ui/WebviewLoader/index.js index 950312bbb..ab17199e5 100644 --- a/src/components/ui/WebviewLoader/index.js +++ b/src/components/ui/WebviewLoader/index.js | |||
@@ -1,16 +1,24 @@ | |||
1 | import React from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import injectSheet from 'react-jss'; | ||
3 | 4 | ||
4 | import FullscreenLoader from '../FullscreenLoader'; | 5 | import FullscreenLoader from '../FullscreenLoader'; |
5 | 6 | ||
6 | const WebviewLoader = ({ name }) => ( | 7 | import styles from './styles'; |
7 | <FullscreenLoader | ||
8 | title={`Loading ${name}`} | ||
9 | /> | ||
10 | ); | ||
11 | 8 | ||
12 | WebviewLoader.propTypes = { | 9 | export default @injectSheet(styles) class WebviewLoader extends Component { |
13 | name: PropTypes.string.isRequired, | 10 | static propTypes = { |
14 | }; | 11 | name: PropTypes.string.isRequired, |
12 | classes: PropTypes.object.isRequired, | ||
13 | } | ||
15 | 14 | ||
16 | export default WebviewLoader; | 15 | render() { |
16 | const { classes, name } = this.props; | ||
17 | return ( | ||
18 | <FullscreenLoader | ||
19 | className={classes.component} | ||
20 | title={`Loading ${name}`} | ||
21 | /> | ||
22 | ); | ||
23 | } | ||
24 | } | ||