✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
feat: enhance styling for CustomEdge and CustomNode components with improved hover effects and background adjustments
AykutSaracc76e1d66c2e3
diff --git a/apps/www/src/features/editor/views/GraphView/CustomEdge/index.tsx b/apps/www/src/features/editor/views/GraphView/CustomEdge/index.tsxindex 6bcda4a9..1efe762a 100644--- a/apps/www/src/features/editor/views/GraphView/CustomEdge/index.tsx+++ b/apps/www/src/features/editor/views/GraphView/CustomEdge/index.tsx@@ -28,9 +28,10 @@ const CustomEdgeWrapper = (props: EdgeProps) => {onEnter={() => setHovered(true)}onLeave={() => setHovered(false)}style={{- stroke: colorScheme === "dark" ? "#444444" : "#BCBEC0",- ...(hovered && { stroke: "#3B82F6" }),- strokeWidth: 1.5,+ stroke: colorScheme === "dark" ? "#3a3a3d" : "#c9cdd3",+ ...(hovered && { stroke: colorScheme === "dark" ? "#60a5fa" : "#3b82f6" }),+ strokeWidth: hovered ? 2 : 1.25,+ transition: "stroke 120ms ease, stroke-width 120ms ease",}}{...props}/>diff --git a/apps/www/src/features/editor/views/GraphView/CustomNode/styles.tsx b/apps/www/src/features/editor/views/GraphView/CustomNode/styles.tsxindex 175b4524..29b1f4d7 100644--- a/apps/www/src/features/editor/views/GraphView/CustomNode/styles.tsx+++ b/apps/www/src/features/editor/views/GraphView/CustomNode/styles.tsx@@ -33,14 +33,17 @@ export const StyledForeignObject = styled.foreignObject<{ $isObject?: boolean }>pointer-events: none;&.searched {- background: rgba(27, 255, 0, 0.1);+ background: rgba(27, 255, 0, 0.08);border: 1px solid ${({ theme }) => theme.TEXT_POSITIVE};- border-radius: 2px;+ border-radius: 4px;box-sizing: border-box;+ box-shadow: 0 0 0 3px rgba(0, 220, 125, 0.12);}.highlight {- background: rgba(255, 214, 0, 0.15);+ background: rgba(255, 214, 0, 0.2);+ border-radius: 2px;+ padding: 0 1px;}.renderVisible {diff --git a/apps/www/src/features/editor/views/GraphView/index.tsx b/apps/www/src/features/editor/views/GraphView/index.tsxindex 53e7a560..3f7ef22d 100644--- a/apps/www/src/features/editor/views/GraphView/index.tsx+++ b/apps/www/src/features/editor/views/GraphView/index.tsx@@ -23,6 +23,24 @@ const StyledEditorWrapper = styled.div<{ $widget: boolean }>`.jsoncrack-space:active {cursor: grabbing;}++ .jsoncrack-space rect {+ rx: 5;+ ry: 5;+ stroke-width: 1;+ filter: drop-shadow(+ 2px 2px 0+ ${({ theme }) =>+ theme.BACKGROUND_SECONDARY === "#f2f3f5"+ ? "rgba(15, 23, 42, 0.25)"+ : "rgba(0, 0, 0, 0.6)"}+ );+ }++ .jsoncrack-space path {+ stroke-linecap: round;+ stroke-linejoin: round;+ }`;interface GraphProps {