diff --git a/src/components/TreeReactFlow/Flavor.ts b/src/components/TreeReactFlow/Flavor.ts index 8d79073b..14e5f041 100644 --- a/src/components/TreeReactFlow/Flavor.ts +++ b/src/components/TreeReactFlow/Flavor.ts @@ -13,7 +13,8 @@ export type NodeFlavor = | NodeFlavorBoxBody | NodeFlavorNoBody; -export const commonHoverClasses = "hover:ring hover:ring-4 hover:ring-offset-4"; +export const commonHoverClasses = + "hover:ring hover:ring-4 hover:ring-offset-4 cursor-pointer"; export const flavorClasses = (flavor: NodeFlavor): string => { switch (flavor) { @@ -170,7 +171,7 @@ export const flavorClasses = (flavor: NodeFlavor): string => { return "border-yellow-primary ring-yellow-primary"; case "PatternCon": - return "border-green-primary ring-green-primary bg-white-primary"; + return "border-green-primary ring-green-primary bg-white-primary cursor-default"; case "PatternBind": return classNames( "border-blue-quaternary ring-blue-quaternary bg-white-primary", @@ -178,7 +179,7 @@ export const flavorClasses = (flavor: NodeFlavor): string => { commonHoverClasses ); case "PatternApp": - return "border-blue-tertiary ring-blue-tertiary bg-blue-tertiary"; + return "border-blue-tertiary ring-blue-tertiary bg-blue-tertiary cursor-default"; } }; diff --git a/src/components/TreeReactFlow/index.tsx b/src/components/TreeReactFlow/index.tsx index bc6c3159..85531469 100644 --- a/src/components/TreeReactFlow/index.tsx +++ b/src/components/TreeReactFlow/index.tsx @@ -158,6 +158,7 @@ const nodeTypes = { className={classNames( "flex justify-center rounded-md border-4", flavorClasses(p.data.flavor), + "cursor-default", // We use a white base so that the "transparent" background will not appear as such. "bg-white-primary" )} @@ -292,7 +293,9 @@ const makePrimerNode = async ( id: JSON.stringify([id, child.id]), source: id, target: child.id, + style: { cursor: "default" }, focusable: false, + interactionWidth: 0, zIndex, }); switch (node.body.tag) { @@ -502,8 +505,9 @@ export const TreeReactFlow = (p: TreeReactFlowProps) => { target: tree.nodeId, type: "step", className: "stroke-grey-tertiary stroke-[0.25rem]", - style: { strokeDasharray: 4 }, + style: { strokeDasharray: 4, cursor: "default" }, focusable: false, + interactionWidth: 0, zIndex: 0, }, ],