import { CheckIcon, XMarkIcon } from '@heroicons/react/24/solid'; interface LibraryItemProps { isEnabled?: boolean; name: string; onToggle: () => void; } const LibraryItem = ({ isEnabled, name, onToggle }: LibraryItemProps) => { return (
  • {name}
    onToggle()} onKeyDown={(e) => { if (e.key === 'Enter') { onToggle(); } }} className={`${ isEnabled ? 'bg-indigo-600' : 'bg-gray-700' } relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring`} >
  • ); }; export default LibraryItem;