import React from "react"; interface ToggleHeaderProps { options: string[]; // Array of strings representing the options activeOption: string; // The currently active option handleClick: (option: string) => void; // Function to handle click events } const ToggleHeader: React.FC = ({ options, activeOption, handleClick, }) => { return (
{options.map((option, index) => (
handleClick(option)} // Call handleClick when an option is clicked > {option}
))}
); }; export default ToggleHeader;