From b3ab3b119385698ccebb3d1c42cc2a08a1df4df1 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 11 Mar 2025 14:00:09 +0530 Subject: [PATCH] styling updates --- src/canvas/canvas.js | 2 +- src/canvas/toolbar.js | 10 ++++++---- src/canvas/widgets/base.js | 1 + src/components/cards.js | 2 +- src/sidebar/sidebar.js | 6 ++++-- src/styles/index.css | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/canvas/canvas.js b/src/canvas/canvas.js index 924a061..4ac96f5 100644 --- a/src/canvas/canvas.js +++ b/src/canvas/canvas.js @@ -1332,7 +1332,7 @@ class Canvas extends React.Component { {/* */} diff --git a/src/canvas/toolbar.js b/src/canvas/toolbar.js index 094db7d..2e3a830 100644 --- a/src/canvas/toolbar.js +++ b/src/canvas/toolbar.js @@ -338,7 +338,7 @@ const CanvasToolBar = memo(({ isOpen, widgetType, attrs = {} }) => { if (isFirstLevel){ return ( - + {renderTool(keyName, val)} @@ -367,7 +367,7 @@ const CanvasToolBar = memo(({ isOpen, widgetType, attrs = {} }) => { if (isFirstLevel){ return ( - +
{renderToolbar(val, keyName, toolCount+1)} @@ -398,13 +398,15 @@ const CanvasToolBar = memo(({ isOpen, widgetType, attrs = {} }) => { ${toolbarOpen ? "tw-translate-x-0" : "tw-translate-x-full"} tw-w-[280px] tw-px-3 tw-p-2 tw-h-[600px] tw-rounded-md tw-z-[1000] tw-shadow-lg tw-transition-transform tw-duration-[0.3s] tw-overflow-x-hidden - tw-flex tw-flex-col tw-gap-2 tw-overflow-y-auto`} + tw-flex tw-flex-col tw-gap-2 tw-overflow-y-auto tw-border-[2px] + tw-border-solid tw-border-gray-300`} style={{ transform: toolbarOpen ? "translateX(0)" : "translateX(calc(100% + 50px))" }} > -

+

{capitalize(`${widgetType || ""}`).replace(/_/g, " ")}

diff --git a/src/canvas/widgets/base.js b/src/canvas/widgets/base.js index dfb0d89..09e4831 100644 --- a/src/canvas/widgets/base.js +++ b/src/canvas/widgets/base.js @@ -1290,6 +1290,7 @@ class Widget extends React.Component { style={{ position: "fixed", // transforms are applied on parent so its going to be relative to parent + // TODO: this Change left and top with elementRect.left left: left, top: top, diff --git a/src/components/cards.js b/src/components/cards.js index f337d57..3ef2547 100644 --- a/src/components/cards.js +++ b/src/components/cards.js @@ -42,7 +42,7 @@ export function SidebarWidgetCard({ name, img, url, license, widgetClass, innerR
+ tw-border-gray-500 tw-shadow-md">
{name}
diff --git a/src/sidebar/sidebar.js b/src/sidebar/sidebar.js index c28075b..fa9826b 100644 --- a/src/sidebar/sidebar.js +++ b/src/sidebar/sidebar.js @@ -62,7 +62,7 @@ function Sidebar({tabs}){ > -
+
{ sidebarTabs.map((tab, index) => { return ( @@ -113,7 +113,9 @@ function Sidebar({tabs}){
-
+