The Coline design system: accessible React components for Coline Apps, themed live by the host workspace, and for Coline Sites in light and dark. Tailwind v4 stylesheet included. MIT.
| 5 |
| 6 | import { cn } from "../lib/utils" |
| 7 |
| 8 | function Progress({ |
| 9 | className, |
| 10 | value, |
| 11 | ...props |
| 12 | }: React.ComponentProps<typeof ProgressPrimitive.Root>) { |
| 13 | return ( |
| 14 | <ProgressPrimitive.Root |
| 15 | data-slot="progress" |
| 16 | className={cn( |
| 17 | "relative flex h-3 w-full items-center overflow-x-hidden rounded-4xl bg-muted", |
| 18 | className |
| 19 | )} |
| 20 | {...props} |
| 21 | > |
| 22 | <ProgressPrimitive.Indicator |
| 23 | data-slot="progress-indicator" |
| 24 | className="size-full flex-1 bg-primary transition-all" |
| 25 | style={{ transform: `translateX(-${100 - (value || 0)}%)` }} |
| 26 | /> |
| 27 | </ProgressPrimitive.Root> |
| 28 | ) |
| 29 | } |
| 30 |
| 31 | export { Progress } |
| 32 |