import { ISwitchLabel } from "../types/switchLabel"; interface ISwitchToggleProps { labels: ISwitchLabel[]; currentLabel: ISwitchLabel; onClick: (label: ISwitchLabel) => void; } function SwitchToggle({ labels, currentLabel, onClick }: ISwitchToggleProps) { return (
{labels.map((lab) => (
onClick(lab)} className={`${ lab.id === currentLabel.id ? "bg-[#00BED7] text-white" : "" } rounded-lg px-6 py-[10px] cursor-pointer transition-all duration-300 ease-in-out`} > {lab.label}
))}
); } export default SwitchToggle;