import classNames from "classnames"; import { VuiFlexContainer } from "../flex/FlexContainer"; import { VuiFlexItem } from "../flex/FlexItem"; import { VuiText } from "../typography/Text"; export const PROGRESS_BAR_COLOR = ["accent", "primary", "danger", "warning", "success", "neutral"] as const; type Props = { color: (typeof PROGRESS_BAR_COLOR)[number]; percentage: number; className?: string; value?: string; }; export const VuiProgressBar = ({ color, percentage, className, value, ...rest }: Props) => { const classes = classNames(className, "vuiProgressBar", `vuiProgressBar--${color}`); const bar = (
); if (value) { return (

{value}

{bar}
); } return bar; };