ERP-node/frontend/components/dataflow/node-editor/nodes/ExternalDBSourceNode.tsx

27 lines
806 B
TypeScript

"use client";
import { memo } from "react";
import { NodeProps } from "reactflow";
import { HardDrive } from "lucide-react";
import { CompactNodeShell } from "./CompactNodeShell";
import type { ExternalDBSourceNodeData } from "@/types/node-editor";
export const ExternalDBSourceNode = memo(({ data, selected }: NodeProps<ExternalDBSourceNodeData>) => {
const summary = data.connectionName
? `${data.connectionName}${data.tableName || "..."}`
: "외부 DB 연결을 설정해 주세요";
return (
<CompactNodeShell
color="#F59E0B"
label={data.displayName || "외부 DB"}
summary={summary}
icon={<HardDrive className="h-3.5 w-3.5" />}
selected={selected}
hasInput={false}
/>
);
});
ExternalDBSourceNode.displayName = "ExternalDBSourceNode";