()
| 4 | import { HuggingFaceTab } from './HuggingFaceTab'; |
| 5 | |
| 6 | export function ModelLibraryTabs() { |
| 7 | const [activeTab, setActiveTab] = useState<'my-library' | 'browse' | 'huggingface'>('my-library'); |
| 8 | |
| 9 | return ( |
| 10 | <div className="flex flex-col h-full"> |
| 11 | {/* Tab navigation */} |
| 12 | <div className="flex border-b border-dark-border bg-dark-bg-secondary"> |
| 13 | <button |
| 14 | onClick={() => setActiveTab('my-library')} |
| 15 | className={`px-6 py-3 font-medium transition-all relative ${ |
| 16 | activeTab === 'my-library' |
| 17 | ? 'text-dark-accent' |
| 18 | : 'text-dark-text-secondary hover:text-dark-text' |
| 19 | }`} |
| 20 | > |
| 21 | <div className="flex items-center gap-2"> |
| 22 | <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 23 | <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z" /> |
| 24 | </svg> |
| 25 | My Library |
| 26 | </div> |
| 27 | {activeTab === 'my-library' && ( |
| 28 | <div className="absolute bottom-0 left-0 right-0 h-0.5 bg-dark-accent" /> |
| 29 | )} |
| 30 | </button> |
| 31 | <button |
| 32 | onClick={() => setActiveTab('browse')} |
| 33 | className={`px-6 py-3 font-medium transition-all relative ${ |
| 34 | activeTab === 'browse' |
| 35 | ? 'text-dark-accent' |
| 36 | : 'text-dark-text-secondary hover:text-dark-text' |
| 37 | }`} |
| 38 | > |
| 39 | <div className="flex items-center gap-2"> |
| 40 | <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 41 | <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> |
| 42 | </svg> |
| 43 | Browse |
| 44 | </div> |
| 45 | {activeTab === 'browse' && ( |
| 46 | <div className="absolute bottom-0 left-0 right-0 h-0.5 bg-dark-accent" /> |
| 47 | )} |
| 48 | </button> |
| 49 | <button |
| 50 | onClick={() => setActiveTab('huggingface')} |
| 51 | className={`px-6 py-3 font-medium transition-all relative ${ |
| 52 | activeTab === 'huggingface' |
| 53 | ? 'text-dark-accent' |
| 54 | : 'text-dark-text-secondary hover:text-dark-text' |
| 55 | }`} |
| 56 | > |
| 57 | <div className="flex items-center gap-2"> |
| 58 | <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 59 | <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z" /> |
| 60 | </svg> |
| 61 | HuggingFace |
| 62 | </div> |
| 63 | {activeTab === 'huggingface' && ( |
nothing calls this directly
no outgoing calls
no test coverage detected