aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/Loader.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ui/Loader.tsx')
-rw-r--r--src/components/ui/Loader.tsx46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/components/ui/Loader.tsx b/src/components/ui/Loader.tsx
deleted file mode 100644
index d4457ae5f..000000000
--- a/src/components/ui/Loader.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
1import { Component, ReactElement, ReactNode } from 'react';
2import { observer, inject } from 'mobx-react';
3import Loader from 'react-loader';
4
5import { FerdiumStores } from '../../@types/stores.types';
6
7interface IProps {
8 className?: string;
9 color?: string;
10 loaded?: boolean;
11 stores?: FerdiumStores;
12 children?: ReactNode;
13}
14
15// TODO: Can this file be merged into the './loader/index.tsx' file?
16@inject('stores')
17@observer
18class LoaderComponent extends Component<IProps> {
19 render(): ReactElement {
20 const {
21 loaded = false,
22 color = 'ACCENT',
23 className,
24 children,
25 } = this.props;
26
27 const loaderColor =
28 color === 'ACCENT' ? this.props.stores!.settings.app.accentColor : color;
29
30 return (
31 // @ts-expect-error Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactLoader> & Readonly<LoaderProps>'
32 <Loader
33 loaded={loaded}
34 width={4}
35 scale={0.6}
36 color={loaderColor}
37 component="span"
38 className={className}
39 >
40 {children}
41 </Loader>
42 );
43 }
44}
45
46export default LoaderComponent;