mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 21:17:43 +03:00
Add component for indicating steps in a wizard
This commit is contained in:
parent
9eb63401c2
commit
6c93b48fca
28
web/src/components/indicators/StepIndicator.tsx
Normal file
28
web/src/components/indicators/StepIndicator.tsx
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
type StepIndicatorProps = {
|
||||||
|
steps: string[];
|
||||||
|
currentStep: number;
|
||||||
|
};
|
||||||
|
export default function StepIndicator({
|
||||||
|
steps,
|
||||||
|
currentStep,
|
||||||
|
}: StepIndicatorProps) {
|
||||||
|
return (
|
||||||
|
<div className="flex flex-row justify-evenly">
|
||||||
|
{steps.map((name, idx) => (
|
||||||
|
<div className="flex flex-col items-center justify-center gap-2">
|
||||||
|
<div
|
||||||
|
className={cn(
|
||||||
|
"flex size-16 items-center justify-center rounded-full",
|
||||||
|
currentStep == idx ? "bg-selected" : "border-2 border-selected",
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{idx + 1}
|
||||||
|
</div>
|
||||||
|
{name}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user