mirror of https://github.com/ctk-hq/ctk
Merge pull request #72 from nuxxapp/refactor/canvas-data
Updated project data, removed old interfaces, and added node icon componentpull/73/head
commit
7ec8a03e4d
@ -0,0 +1,28 @@
|
||||
import { DatabaseIcon, ServerIcon, ChipIcon } from "@heroicons/react/solid";
|
||||
|
||||
type NodeIconProps = {
|
||||
nodeType: string;
|
||||
};
|
||||
|
||||
const NodeIcon = ({ nodeType }: NodeIconProps) => {
|
||||
switch (nodeType) {
|
||||
case "SERVICE":
|
||||
return (
|
||||
<ServerIcon className="w-3 h-3 text-gray-500 absolute top-2 right-2" />
|
||||
);
|
||||
case "VOLUME":
|
||||
return (
|
||||
<DatabaseIcon className="w-3 h-3 text-gray-500 absolute top-2 right-2" />
|
||||
);
|
||||
case "NETWORK":
|
||||
return (
|
||||
<ChipIcon className="w-3 h-3 text-gray-500 absolute top-2 right-2" />
|
||||
);
|
||||
default:
|
||||
return (
|
||||
<ServerIcon className="w-3 h-3 text-gray-600 absolute top-2 right-2" />
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default NodeIcon;
|
||||
@ -1,2 +0,0 @@
|
||||
export const ServiceNodeConfiguration =
|
||||
'{"canvasConfig":{"name":""},"key":"service","type":"SERVICE","inputs":["op_source"],"outputs":[]}';
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue