Adding missing .tsx files

Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
This commit is contained in:
Diogenes Fernandes
2025-06-06 12:08:23 -03:00
parent e4cf1faa9e
commit 13ada32895
3 changed files with 42 additions and 3 deletions

View File

@@ -10,7 +10,6 @@ import (
)
// Embed the built React app
//go:embed ui/dist/*
var uiFS embed.FS
// GetUIFileSystem returns the embedded UI filesystem
@@ -23,6 +22,6 @@ func GetUIFileSystem() http.FileSystem {
// return an empty filesystem
return http.Dir(".")
}
return http.FS(sub)
}
}

View File

@@ -0,0 +1,20 @@
import { Handle, Position } from "@xyflow/react";
interface ResourceNodeProps {
data: any;
id: string;
}
export default function OutputRootNode({ data, id }: ResourceNodeProps) {
return (
<div
className={`relative px-3 py-2 rounded-lg text-xs font-medium border-2 border-red-500 bg-red-50 text-red-800 min-w-[120px]`}
>
<Handle type="target" position={Position.Left} />
<div className="font-semibold">{data.name}</div>
<div className="text-xs opacity-80">{data.resourceType}</div>
{data.module && <div className="text-xs opacity-60 mt-1">📁 {data.module}</div>}
<Handle type="source" position={Position.Right} />
</div>
);
}

View File

@@ -0,0 +1,20 @@
import { Handle, Position } from "@xyflow/react";
interface ResourceNodeProps {
data: any;
id: string;
}
export default function VariableRootNode({ data, id }: ResourceNodeProps) {
return (
<div
className={`relative px-3 py-2 rounded-lg text-xs font-medium border-2 border-teal-500 bg-teal-50 text-teal-800 min-w-[120px]`}
>
<Handle type="target" position={Position.Left} />
<div className="font-semibold">{data.name}</div>
<div className="text-xs opacity-80">{data.resourceType}</div>
{data.module && <div className="text-xs opacity-60 mt-1">📁 {data.module}</div>}
<Handle type="source" position={Position.Right} />
</div>
);
}