From 5ee0860cd965eb575f5ae0ed6b636af9776bc725 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Mon, 21 Oct 2024 14:18:58 +0300 Subject: [PATCH] fix: show "delete variable" in variable tooltip (#4322) Ref https://github.com/webstudio-is/webstudio/issues/3399 ![Screenshot 2024-10-20 at 10 41 55](https://github.com/user-attachments/assets/d194cc13-efec-40fa-8021-13d2473188a1) --- .../app/builder/features/style-panel/property-label.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/builder/app/builder/features/style-panel/property-label.tsx b/apps/builder/app/builder/features/style-panel/property-label.tsx index 1eff785cd359..3c28dca3e7ac 100644 --- a/apps/builder/app/builder/features/style-panel/property-label.tsx +++ b/apps/builder/app/builder/features/style-panel/property-label.tsx @@ -183,10 +183,12 @@ export const PropertyInfo = ({ } suffix={} - css={{ gridTemplateColumns: "2fr 3fr 1fr" }} + css={{ gridTemplateColumns: "1fr max-content 1fr" }} onClick={onReset} > - Reset value + {styles[0].property.startsWith("--") + ? "Delete variable" + : "Reset value"} )}