xtreme-ui
Version:
Collection of reusable components that can be used in web projects
26 lines (25 loc) • 639 B
JavaScript
"use client";
import { jsx as s } from "react/jsx-runtime";
import { forwardRef as l } from "react";
import n from "clsx";
/* empty css */
const p = l((e, o) => {
const { className: t, progress: a = 100, intermediate: r = !1 } = e, i = r ? 150 : Math.min(Math.max(a, 0), 100), m = n(
"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
};