xtreme-ui
Version:
Collection of reusable components that can be used in web projects
14 lines (13 loc) • 610 B
JavaScript
"use client";
import { jsx as s } from "react/jsx-runtime";
import l from "clsx";
import { forwardRef as n } from "react";
import './progressbar.css';/* empty css */
const p = n((e, o) => {
const { className: t, progress: a = 100, intermediate: r = !1 } = e, i = r ? 150 : Math.min(Math.max(a, 0), 100), m = l("xtrProgressBar", r && "intermediate", t);
return /* @__PURE__ */ s("div", { ref: o, className: m, role: "progressbar", children: /* @__PURE__ */ s("span", { className: "progress", style: { width: `${i}%` } }) });
});
p.displayName = "ProgressBar";
export {
p as ProgressBar
};