import { useRef } from 'react'; const ToggleSwitch = ({ name, label, checked, onChange }) => { const inputRef = useRef(null); const handleChange = (e) => { onChange(e); if (inputRef.current) { inputRef.current.blur(); // Remove focus } }; return (
); }; export default ToggleSwitch;