18 lines
520 B
TypeScript
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>
|
|
);
|
|
}
|