mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-09 03:18:33 +00:00

- update Theia to `1.39.0`, - remove the application packager and fix the security vulnerabilities, - bundle the backed application with `webpack`, and - enhance the developer docs. Co-authored-by: Akos Kitta <a.kitta@arduino.cc> Co-authored-by: per1234 <accounts@perglass.com> Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
29 lines
720 B
TypeScript
29 lines
720 B
TypeScript
import React from '@theia/core/shared/react';
|
|
|
|
export type ProgressBarProps = {
|
|
percent?: number;
|
|
showPercentage?: boolean;
|
|
};
|
|
|
|
export default function ProgressBar({
|
|
percent = 0,
|
|
showPercentage = false,
|
|
}: ProgressBarProps): React.ReactElement {
|
|
const roundedPercent = Math.round(percent);
|
|
return (
|
|
<div className="progress-bar">
|
|
<div className="progress-bar--outer">
|
|
<div
|
|
className="progress-bar--inner"
|
|
style={{ width: `${roundedPercent}%` }}
|
|
/>
|
|
</div>
|
|
{showPercentage && (
|
|
<div className="progress-bar--percentage">
|
|
<div className="progress-bar--percentage-text">{roundedPercent}%</div>
|
|
</div>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|