azure-devops-ui
Version:
React components for building web UI in Azure DevOps
17 lines (16 loc) • 1.01 kB
JavaScript
import "../../CommonImports";
import "../../Core/core.css";
import "./ProgressBar.css";
import * as React from "react";
import { Observer } from '../../Observer';
import { css } from '../../Util';
export const ProgressBar = (props) => {
return (React.createElement(Observer, { currentValue: props.currentValue }, (barProps) => {
const { transitionDuration = 150 } = props;
return (React.createElement("span", { className: css(props.className, "bolt-progress-bar-container flex-row flex-noshrink flex-grow scroll-hidden") },
React.createElement("span", { "aria-label": props.ariaLabel, "aria-valuemin": 0, "aria-valuemax": props.maxValue, "aria-valuenow": barProps.currentValue, className: css(props.progressBarClassName, "bolt-progress-bar-bar"), role: "progressbar", style: {
transitionDuration: `${transitionDuration}ms`,
transform: `scaleX(${barProps.currentValue / props.maxValue})`
} })));
}));
};