diff options
Diffstat (limited to 'app/client/common')
| -rw-r--r-- | app/client/common/loading.component.js | 12 | ||||
| -rw-r--r-- | app/client/common/progress.component.js | 16 |
2 files changed, 28 insertions, 0 deletions
diff --git a/app/client/common/loading.component.js b/app/client/common/loading.component.js new file mode 100644 index 0000000..f8033db --- /dev/null +++ b/app/client/common/loading.component.js @@ -0,0 +1,12 @@ +import { h, Component } from 'preact' + +import Progress from './progress.component' + +export default function Loading({progress}) { + return ( + <div className='loading'> + Loading<br/> + <Progress progress={progress} /> + </div> + ) +} diff --git a/app/client/common/progress.component.js b/app/client/common/progress.component.js new file mode 100644 index 0000000..364f232 --- /dev/null +++ b/app/client/common/progress.component.js @@ -0,0 +1,16 @@ +import { h, Component } from 'preact' + +export default function Progress({progress}) { + const { i, n } = progress + const a = [] + for (let j = 0; j < n; j++) { + a.push( + <div key={j} className={j < i ? 'x' : 'o'}></div> + ) + } + return ( + <div className='progress'> + {a} + </div> + ) +} |
