aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/FullscreenLoader/index.tsx
diff options
context:
space:
mode:
authorLibravatar muhamedsalih-tw <104364298+muhamedsalih-tw@users.noreply.github.com>2022-11-20 17:35:21 +0530
committerLibravatar GitHub <noreply@github.com>2022-11-20 17:35:21 +0530
commit86f9ab693dcad951271f727046214b03d91ebd69 (patch)
tree3d32ff4814b5484495b811c5fe0ebea4805f4e55 /src/components/ui/FullscreenLoader/index.tsx
parent6.2.1-nightly.47 [skip ci] (diff)
downloadferdium-app-86f9ab693dcad951271f727046214b03d91ebd69.tar.gz
ferdium-app-86f9ab693dcad951271f727046214b03d91ebd69.tar.zst
ferdium-app-86f9ab693dcad951271f727046214b03d91ebd69.zip
Transform Todo feature, ServiceBarTargetUrl, ServiceIcon, TeamDashboard, Slider, Loader & WorkspaceSwitchningIndicator into ts (#782)
Diffstat (limited to 'src/components/ui/FullscreenLoader/index.tsx')
-rw-r--r--src/components/ui/FullscreenLoader/index.tsx54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/components/ui/FullscreenLoader/index.tsx b/src/components/ui/FullscreenLoader/index.tsx
new file mode 100644
index 000000000..002ee7932
--- /dev/null
+++ b/src/components/ui/FullscreenLoader/index.tsx
@@ -0,0 +1,54 @@
1import { Component, ReactElement, ReactNode } from 'react';
2import { observer } from 'mobx-react';
3import withStyles, { WithStylesProps } from 'react-jss';
4import classnames from 'classnames';
5import Loader from '../Loader';
6import styles from './styles';
7import { H1 } from '../headline';
8import { Theme } from '../../../themes';
9
10interface IProps extends WithStylesProps<typeof styles> {
11 className?: string;
12 title?: string;
13 theme?: Theme;
14 spinnerColor?: string;
15 loaded?: boolean;
16 children?: ReactNode;
17}
18
19@observer
20class FullscreenLoader extends Component<IProps> {
21 render(): ReactElement {
22 const {
23 classes,
24 theme = '',
25 className = '',
26 spinnerColor = '',
27 children = null,
28 title = '',
29 loaded = false,
30 } = this.props;
31
32 return (
33 <div className={classes.wrapper}>
34 <div
35 className={classnames({
36 [`${classes.component}`]: true,
37 [`${className}`]: className,
38 })}
39 >
40 <H1 className={classes.title}>{title}</H1>
41 <Loader
42 color={
43 spinnerColor || (theme && theme.colorFullscreenLoaderSpinner)
44 }
45 loaded={loaded}
46 />
47 {children && <div className={classes.content}>{children}</div>}
48 </div>
49 </div>
50 );
51 }
52}
53
54export default withStyles(styles, { injectTheme: true })(FullscreenLoader);