-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from bleu-fi/joao/click-629-implement-onboardi…
…ng-flow Add progress component
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as ProgressPrimitive from "@radix-ui/react-progress"; | ||
import * as React from "react"; | ||
|
||
import { cn } from "#/lib/utils"; | ||
|
||
const Progress = React.forwardRef< | ||
React.ElementRef<typeof ProgressPrimitive.Root>, | ||
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> | ||
>(({ className, value, ...props }, ref) => ( | ||
<ProgressPrimitive.Root | ||
ref={ref} | ||
className={cn( | ||
"relative h-4 w-full overflow-hidden rounded-full bg-secondary", | ||
className | ||
)} | ||
{...props} | ||
> | ||
<ProgressPrimitive.Indicator | ||
className="size-full flex-1 bg-primary transition-all" | ||
style={{ transform: `translateX(-${100 - (value || 0)}%)` }} | ||
/> | ||
</ProgressPrimitive.Root> | ||
)); | ||
Progress.displayName = ProgressPrimitive.Root.displayName; | ||
|
||
export { Progress }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters