progress-indicator-store-and-HOC
[arvados-workbench2.git] / src / views-components / progress / content-progress.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import * as React from 'react';
6 import { CircularProgress } from '@material-ui/core';
7 import { withProgress } from '~/store/progress-indicator/with-progress';
8 import { WithProgressStateProps } from '~/store/progress-indicator/with-progress';
9 import { ProgressIndicatorData } from '~/store/progress-indicator/progress-indicator-reducer';
10
11 export const ContentProgress = withProgress(ProgressIndicatorData.CONTENT_PROGRESS)((props: WithProgressStateProps) => 
12     props.started ? <CircularProgress /> : null
13 );