Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import * as React from "react"
|
||||
import * as ProgressPrimitive from "@radix-ui/react-progress"
|
||||
|
||||
import { Progress as SubframeProgress } from "~/ui/components/Progress"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
||||
// Subframe migration (strangler shim):
|
||||
// Keeps the original shadcn `Progress` API (a bare `value` 0-100 bar) but renders the
|
||||
// Subframe design-system Progress behind it. Subframe's Progress is a richer labelled
|
||||
// widget with a fixed `w-56` width; here we suppress the label (`hideLabel`) and reset the
|
||||
// width so it behaves like the original full-width bar. The public API (single `Progress`
|
||||
// export, `value`, `className`, native Root props) is unchanged.
|
||||
function Progress({
|
||||
className,
|
||||
value,
|
||||
...props
|
||||
}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
|
||||
return (
|
||||
<SubframeProgress
|
||||
hideLabel
|
||||
value={value ?? 0}
|
||||
className={cn("w-full", className)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export { Progress }
|
||||
Reference in new issue
Block a user