From b066c7f0233038cbcea688fe395c374bb75f5125 Mon Sep 17 00:00:00 2001 From: Venessa Kuchenik Date: Tue, 22 Jul 2025 13:41:32 -0700 Subject: [PATCH] add text highlighting controls only disable highlighting text when dragging widgets --- client/src/components/layout/Canvas/Widget.jsx | 2 +- .../components/layout/Canvas/views/WidgetCanvas.jsx | 11 +++++++++++ client/src/theme.js | 11 +++++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/client/src/components/layout/Canvas/Widget.jsx b/client/src/components/layout/Canvas/Widget.jsx index e17e2fb..4052d0c 100644 --- a/client/src/components/layout/Canvas/Widget.jsx +++ b/client/src/components/layout/Canvas/Widget.jsx @@ -5,7 +5,7 @@ export default function Widget({ title }) { const styles = recipe(); return ( - + { + document.body.style.userSelect = "none"; + }; + // allow text highlighting all other times + const handleDragStop = () => { + document.body.style.userSelect = ""; + }; + return ( {layout.map((item) => ( diff --git a/client/src/theme.js b/client/src/theme.js index cb98a77..31dbac5 100644 --- a/client/src/theme.js +++ b/client/src/theme.js @@ -55,7 +55,10 @@ const widgetRecipe = defineSlotRecipe({ root: { bg: "base100", borderRadius: "md", - p: "1" + p: "1", + border: "1px solid", + borderColor: "{base300}", + textAlign: "center", }, header: { bg: "base100", @@ -73,9 +76,9 @@ const config = defineConfig({ theme: { semanticTokens: { colors: { - base100: { value: {base: "#f7f9fa", _dark: "#787b73"}}, - base200: { value: {base: "#eef2f6", _dark: "#242424"}}, - base300: { value: {base: "#dfe5ed", _dark: "#60645a"}}, + base100: { value: {base: "#f6f9faff", _dark: "#787b73"}}, + base200: { value: {base: "#e6ecf1ff", _dark: "#242424"}}, + base300: { value: {base: "#d3dae4ff", _dark: "#60645a"}}, // primary: { value: {base: "#9cd855", _dark: "#629631"}}, primary: { value: {base: "#2B98F8", _dark: "#2B98F8"}}, // primaryLt: { value: {base: "#c9e9a0", _dark: "#92948e"}},