'use client'; import { Circle, X } from 'lucide-react'; import { Button } from '@spoon/ui'; import { basename } from './languages'; export type OpenFileTab = { path: string; dirty: boolean; }; export const FileTabs = ({ tabs, activePath, onActivate, onClose, }: { tabs: OpenFileTab[]; activePath?: string; onActivate: (path: string) => void; onClose: (path: string) => void; }) => { if (tabs.length === 0) return null; return (
{tabs.map((tab) => { const active = tab.path === activePath; return (
); })}
); };