f4d1dfd3a7
feat: context files
21 lines
560 B
TypeScript
21 lines
560 B
TypeScript
'use client';
|
|
|
|
import { memo } from 'react';
|
|
import type { PlanContextItem } from '@/lib/types/context';
|
|
import { ContextChip } from './context-chip';
|
|
import { LazyPlanPreview } from './lazy-plan-preview';
|
|
|
|
export const PlanItem = memo(function PlanItem({ item }: { item: PlanContextItem }) {
|
|
return (
|
|
<ContextChip
|
|
kind="plan"
|
|
label={item.label}
|
|
pinned={item.pinned}
|
|
preview={<LazyPlanPreview taskId={item.taskId ?? null} />}
|
|
onClick={item.onOpen}
|
|
onUnpin={item.onUnpin}
|
|
onRemove={item.onRemove}
|
|
/>
|
|
);
|
|
});
|