blob: d804dd1b878aca1ef43c8892a3b7a1073cc330a8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import CircularProgress from 'material-ui/CircularProgress';
import * as React from 'react';
const CIRCULAR_PROGRESS_SIZE = 40;
const CIRCULAR_PROGRESS_THICKNESS = 5;
export interface LoadingProps {
isLoading: boolean;
content: React.ReactNode;
}
export const Loading = (props: LoadingProps) => {
if (props.isLoading) {
return (
<div className="center">
<CircularProgress size={CIRCULAR_PROGRESS_SIZE} thickness={CIRCULAR_PROGRESS_THICKNESS} />
</div>
);
} else {
return <div>{props.content}</div>;
}
};
|