Function
FileIcon
({ extension }: { extension?: string })
Source from the content-addressed store, hash-verified
| 95 | ] |
| 96 | |
| 97 | const FileIcon = ({ extension }: { extension?: string }) => { |
| 98 | const iconColor = |
| 99 | { |
| 100 | ts: 'text-blue-400', |
| 101 | tsx: 'text-blue-500', |
| 102 | js: 'text-yellow-400', |
| 103 | jsx: 'text-yellow-500', |
| 104 | json: 'text-yellow-300', |
| 105 | md: 'text-white', |
| 106 | }[extension || ''] || 'text-zinc-400' |
| 107 | |
| 108 | return ( |
| 109 | <div className={cn('w-4 h-4 mr-2', iconColor)}> |
| 110 | {extension ? '📄' : '📁'} |
| 111 | </div> |
| 112 | ) |
| 113 | } |
| 114 | |
| 115 | const FileTreeItem = ({ |
| 116 | item, |
Callers
nothing calls this directly
Tested by
no test coverage detected