siakad-itm/resources/js/components/user-active-switch.tsx
Yoga Pangestu 9c03876a71
Some checks failed
tests / ci (pull_request) Has been cancelled
feat: implement user status management with active/inactive toggle
2026-08-30 11:08:08 +07:00

18 lines
520 B
TypeScript

import { Switch } from '@/components/ui/switch';
type UserActiveSwitchProps = {
isActive: boolean;
onChange: (isActive: boolean) => void;
};
export function UserActiveSwitch({ isActive, onChange }: UserActiveSwitchProps) {
return (
<div className="flex items-center gap-2">
<Switch checked={isActive} onCheckedChange={onChange} />
<span className="text-sm text-muted-foreground">
{isActive ? 'Aktif' : 'Nonaktif'}
</span>
</div>
);
}