import { ChevronUp, ListVideo, X } from "lucide-react"; import { memo } from "react"; interface ContextChipProps { label: string; position: number; total: number; /** 提供时整个标签可点:展开 / 打开侧栏里的完整列表 */ onExpand?: () => void; expandLabel?: string; onExit: () => void; exitLabel: string; } // 顶部的模式提示:说明上下切换当前在哪个列表里移动,避免「为什么跳到这里了」的困惑 export const ContextChip = memo(function ContextChip({ label, position, total, onExpand, expandLabel, onExit, exitLabel, }: ContextChipProps) { const content = ( <> {label} {position}/{total} {onExpand && } ); return (
{onExpand ? ( ) : (
{content}
)}
); });