From 23cc354a499442f394034cf212382f575b3959ac Mon Sep 17 00:00:00 2001 From: Marco Christian Krenn Date: Fri, 24 Nov 2023 14:17:31 +0100 Subject: [PATCH] fix contrasting from set output --- .changeset/tricky-elephants-scream.md | 5 +++++ .../nodes/color/contrastingFromSetNode.tsx | 18 ++++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) create mode 100644 .changeset/tricky-elephants-scream.md diff --git a/.changeset/tricky-elephants-scream.md b/.changeset/tricky-elephants-scream.md new file mode 100644 index 00000000..59db1efb --- /dev/null +++ b/.changeset/tricky-elephants-scream.md @@ -0,0 +1,5 @@ +--- +"@tokens-studio/graph-editor": patch +--- + +Fix output of Contrasting from Set diff --git a/packages/graph-editor/src/components/flow/nodes/color/contrastingFromSetNode.tsx b/packages/graph-editor/src/components/flow/nodes/color/contrastingFromSetNode.tsx index 5dcd7567..d92ca338 100644 --- a/packages/graph-editor/src/components/flow/nodes/color/contrastingFromSetNode.tsx +++ b/packages/graph-editor/src/components/flow/nodes/color/contrastingFromSetNode.tsx @@ -48,19 +48,6 @@ const ContrastingFromSetNode = () => { [setState], ); - const entries = useMemo(() => { - if (!output || typeof output !== 'object' || !output.token) { - return null; - } - - return Object.entries(output.token).map(([key, value]) => ( - - {key} - - - )); - }, [output]); - return ( @@ -117,7 +104,10 @@ const ContrastingFromSetNode = () => { - {entries} + + Token + + Index {output.index}