diff --git a/apps/roam/src/components/settings/DiscourseNodeCanvasSettings.tsx b/apps/roam/src/components/settings/DiscourseNodeCanvasSettings.tsx index 287f4194b..6718642e8 100644 --- a/apps/roam/src/components/settings/DiscourseNodeCanvasSettings.tsx +++ b/apps/roam/src/components/settings/DiscourseNodeCanvasSettings.tsx @@ -1,11 +1,9 @@ import { InputGroup, - Label, Radio, RadioGroup, Tooltip, Icon, - ControlGroup, } from "@blueprintjs/core"; import React, { useState, useMemo } from "react"; import getBasicTreeByParentUid from "roamjs-components/queries/getBasicTreeByParentUid"; @@ -37,10 +35,6 @@ const DiscourseNodeCanvasSettings = ({ uid: string; }) => { const tree = useMemo(() => getBasicTreeByParentUid(uid), [uid]); - const [color, setColor] = useState(() => { - const color = getSettingValueFromTree({ tree, key: "color" }); - return formatHexColor(color); - }); const alias = getSettingValueFromTree({ tree, key: "alias" }); const [queryBuilderAlias, setQueryBuilderAlias] = useState(() => getSettingValueFromTree({ tree, key: "query-builder-alias" }), @@ -54,49 +48,6 @@ const DiscourseNodeCanvasSettings = ({ return (
-
- - - { - const colorValue = e.target.value.replace("#", ""); // remove hash to not create roam link - setColor(e.target.value); - void setInputSetting({ - blockUid: uid, - key: "color", - value: colorValue, - }); - setDiscourseNodeSetting( - nodeType, - ["canvasSettings", "color"], - colorValue, - ); - }} - /> - - { - setColor(""); - void setInputSetting({ - blockUid: uid, - key: "color", - value: "", - }); - setDiscourseNodeSetting( - nodeType, - ["canvasSettings", "color"], - "", - ); - }} - /> - - -
(() => + formatHexColor(node.canvasSettings?.color ?? ""), + ); + const [selectedTabId, setSelectedTabId] = useState("general"); const [tagError, setTagError] = useState(""); const [formatError, setFormatError] = useState(""); @@ -181,6 +198,52 @@ const NodeConfig = ({ parentUid={node.type} uid={tagUid} /> + <> + +
} />