diff options
author | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-08-10 17:08:47 -0400 |
---|---|---|
committer | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-08-10 17:08:47 -0400 |
commit | 820d40eea4eeb5977889e0ef6c35f9092df44b4b (patch) | |
tree | a71eca4e766ccca46060e99b62071f0f9f22247e /src/client/views/nodes/LoadingBox.tsx | |
parent | 6c349731fb84f1c44993d2bc55410da19db29a07 (diff) |
created placeholder loading box but have to get location of final doc to update with loading box
Diffstat (limited to 'src/client/views/nodes/LoadingBox.tsx')
-rw-r--r-- | src/client/views/nodes/LoadingBox.tsx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/client/views/nodes/LoadingBox.tsx b/src/client/views/nodes/LoadingBox.tsx new file mode 100644 index 000000000..0e0619241 --- /dev/null +++ b/src/client/views/nodes/LoadingBox.tsx @@ -0,0 +1,31 @@ +import { observer } from 'mobx-react'; +import { ViewBoxAnnotatableComponent } from '../DocComponent'; +import { FieldView, FieldViewProps } from './FieldView'; +import * as React from 'react'; +import './LoadingBox.scss'; +import ReactLoading from 'react-loading'; + +export interface LoadingBoxProps { + title: string; + text: string; +} + +@observer +export class LoadingBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { + public static LayoutString(fieldKey: string) { + return FieldView.LayoutString(LoadingBox, fieldKey); + } + + constructor(props: any) { + super(props); + } + + render() { + return ( + <div className="loadingBoxContainer"> + <span>Loading: {this.dataDoc.text}</span> + <ReactLoading type={'spinningBubbles'} color={'blue'} height={100} width={100} /> + </div> + ); + } +} |