import React from "react"; interface InputToggleProps { label: string; // Represents the toggle state (on/off) onClick?: () => void; // Function to handle toggle clicks value?: boolean; inputKey: string; } // Update InputToggle.tsx to be fully controlled const InputToggle: React.FC = ({ label, onClick, value = false, inputKey, }) => { // Remove internal state and use the value prop directly function handleOnClick() { if (onClick) onClick(); } return (
); }; export default InputToggle;