Add Oudelaa dashboard API integration
فشلت بعض الفحوصات
Deploy To Ghaymah / deploy (push) Has been cancelled
فشلت بعض الفحوصات
Deploy To Ghaymah / deploy (push) Has been cancelled
هذا الالتزام موجود في:
32
oudelaa_dashboard/components/ui/switch.tsx
Normal file
32
oudelaa_dashboard/components/ui/switch.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
"use client";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type SwitchProps = {
|
||||
checked: boolean;
|
||||
onCheckedChange: (value: boolean) => void;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export function Switch({ checked, onCheckedChange, className }: SwitchProps) {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
role="switch"
|
||||
aria-checked={checked}
|
||||
onClick={() => onCheckedChange(!checked)}
|
||||
className={cn(
|
||||
"relative h-6 w-11 rounded-full border border-border transition",
|
||||
checked ? "bg-primary" : "bg-secondary",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<span
|
||||
className={cn(
|
||||
"absolute top-0.5 h-[18px] w-[18px] rounded-full bg-background transition",
|
||||
checked ? "right-0.5" : "right-[22px]",
|
||||
)}
|
||||
/>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم