mirror of https://github.com/ctk-hq/ctk
refactor: project data, remove old interfaces, add node icon component
parent
247a7d5ca8
commit
bb8a46b468
@ -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":[]}';
|
|
||||||
Loading…
Reference in New Issue