import * as React from "react"; import { ProgressIndicator, ProgressRoot, type ProgressRootProps, ProgressValue } from "./components/index.js"; import { useProgressBar } from "./useProgressBar.js"; import { cn, makeDecoratable } from "~/utils.js"; interface ProgressBarProps extends ProgressRootProps { valuePosition?: "start" | "end" | "both"; } const DecoratableProgressBar = ({ valuePosition, className, ...props }: ProgressBarProps) => { const { vm } = useProgressBar(props); return (
{valuePosition && valuePosition !== "end" && ( )} {valuePosition && valuePosition !== "start" && }
); }; const ProgressBar = makeDecoratable("ProgressBar", DecoratableProgressBar); export { ProgressBar, type ProgressBarProps };