forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogressBar.tsx
More file actions
30 lines (26 loc) · 852 Bytes
/
progressBar.tsx
File metadata and controls
30 lines (26 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import './progressBar.css';
import * as React from 'react';
import { getLocString } from '../react-common/locReactSide';
export interface IEmptyRowsProps {
total: number;
current: number;
}
export const ProgressBar = (props: IEmptyRowsProps) => {
const percent = (props.current / props.total) * 100;
const percentText = `${Math.round(percent)}%`;
const style: React.CSSProperties = {
width: percentText
};
const message = getLocString('DataScience.fetchingDataViewer', 'Fetching data ...');
return (
<div className="progress-container">
{message}
<div className="progress-bar" style={style}>
{percentText}
</div>
</div>
);
};