mirror of
https://github.com/fccview/cronmaster.git
synced 2026-01-06 04:48:51 -05:00
23 lines
518 B
TypeScript
23 lines
518 B
TypeScript
"use client";
|
|
|
|
interface SwitchProps {
|
|
checked: boolean;
|
|
onCheckedChange: (checked: boolean) => void;
|
|
className?: string;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export const Switch = ({ checked, onCheckedChange, className = "", disabled = false }: SwitchProps) => {
|
|
return (
|
|
<label className={className}>
|
|
<input
|
|
type="checkbox"
|
|
checked={checked}
|
|
onChange={(e) => onCheckedChange(e.target.checked)}
|
|
disabled={disabled}
|
|
className="terminal-font"
|
|
/>
|
|
</label>
|
|
);
|
|
};
|