1
0
Fork 0
polaris-task-force/src/components/admin/narrative-flow/NarrativeBeatNode.tsx

27 lines
948 B
TypeScript

"use client";
import { type NodeProps } from "@xyflow/react";
import { BookOpenTextIcon, PencilIcon } from "lucide-react";
import { NodeShell } from "./NodeShell";
export function NarrativeBeatNode({ data }: NodeProps) {
const d = data as { title?: string; text?: string };
return (
<NodeShell
nodeType="narrativeBeat"
className="bg-blue-950/80 border border-blue-500/50 rounded-lg shadow-md min-w-56"
>
<div className="flex items-center gap-2 px-3 py-2 border-b border-blue-500/30">
<BookOpenTextIcon className="size-4 text-blue-400 shrink-0" />
<span className="text-sm font-medium text-blue-200 flex-1 truncate">
{d.title || "Untitled Beat"}
</span>
<PencilIcon className="size-3 text-blue-500/40 shrink-0" />
</div>
<div className="px-3 py-2 text-xs text-blue-300/80 line-clamp-3">
{d.text || "No description."}
</div>
</NodeShell>
);
}