diff options
author | 2021-10-14 23:32:05 +0200 | |
---|---|---|
committer | 2021-10-15 03:02:05 +0530 | |
commit | 137555821f172e4eadc7cf099d4270ae8fc1374e (patch) | |
tree | 693882bbf7a6b2a24b5a727091d09586d0371007 /src/components/ui/Loader.js | |
parent | New translations en-US.json (Spanish) (#2072) (diff) | |
download | ferdium-app-137555821f172e4eadc7cf099d4270ae8fc1374e.tar.gz ferdium-app-137555821f172e4eadc7cf099d4270ae8fc1374e.tar.zst ferdium-app-137555821f172e4eadc7cf099d4270ae8fc1374e.zip |
chore: convert components to tsx (#2071)
Diffstat (limited to 'src/components/ui/Loader.js')
-rw-r--r-- | src/components/ui/Loader.js | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/components/ui/Loader.js b/src/components/ui/Loader.js deleted file mode 100644 index 71c6b9552..000000000 --- a/src/components/ui/Loader.js +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer, inject } from 'mobx-react'; | ||
3 | import PropTypes from 'prop-types'; | ||
4 | import Loader from 'react-loader'; | ||
5 | |||
6 | import { oneOrManyChildElements } from '../../prop-types'; | ||
7 | |||
8 | @inject('stores') | ||
9 | @observer | ||
10 | class LoaderComponent extends Component { | ||
11 | static propTypes = { | ||
12 | children: oneOrManyChildElements, | ||
13 | loaded: PropTypes.bool, | ||
14 | className: PropTypes.string, | ||
15 | color: PropTypes.string, | ||
16 | stores: PropTypes.shape({ | ||
17 | settings: PropTypes.shape({ | ||
18 | app: PropTypes.shape({ | ||
19 | accentColor: PropTypes.string.isRequired, | ||
20 | }).isRequired, | ||
21 | }).isRequired, | ||
22 | }).isRequired, | ||
23 | }; | ||
24 | |||
25 | static defaultProps = { | ||
26 | children: null, | ||
27 | loaded: false, | ||
28 | className: '', | ||
29 | color: 'ACCENT', | ||
30 | }; | ||
31 | |||
32 | render() { | ||
33 | const { children, loaded, className } = this.props; | ||
34 | |||
35 | const color = | ||
36 | this.props.color !== 'ACCENT' | ||
37 | ? this.props.color | ||
38 | : this.props.stores.settings.app.accentColor; | ||
39 | |||
40 | return ( | ||
41 | <Loader | ||
42 | loaded={loaded} | ||
43 | // lines={10} | ||
44 | width={4} | ||
45 | scale={0.6} | ||
46 | color={color} | ||
47 | component="span" | ||
48 | className={className} | ||
49 | > | ||
50 | {children} | ||
51 | </Loader> | ||
52 | ); | ||
53 | } | ||
54 | } | ||
55 | |||
56 | export default LoaderComponent; | ||