From 3fd22cd3fbbdbb251eae5752f862797067e67209 Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Fri, 27 Mar 2026 11:39:15 +0000 Subject: [PATCH] feat: Update Button component style for improved transparency in icon buttons --- .../Dashboard/Toolbar/DashboardToolbar.tsx | 102 +++++++----------- Common/UI/Components/Button/Button.tsx | 2 +- 2 files changed, 40 insertions(+), 64 deletions(-) diff --git a/App/FeatureSet/Dashboard/src/Components/Dashboard/Toolbar/DashboardToolbar.tsx b/App/FeatureSet/Dashboard/src/Components/Dashboard/Toolbar/DashboardToolbar.tsx index ee4c71ee45..ba0bce8b84 100644 --- a/App/FeatureSet/Dashboard/src/Components/Dashboard/Toolbar/DashboardToolbar.tsx +++ b/App/FeatureSet/Dashboard/src/Components/Dashboard/Toolbar/DashboardToolbar.tsx @@ -1,5 +1,5 @@ import IconProp from "Common/Types/Icon/IconProp"; -import Button, { ButtonStyleType } from "Common/UI/Components/Button/Button"; +import Button, { ButtonSize, ButtonStyleType } from "Common/UI/Components/Button/Button"; import React, { FunctionComponent, ReactElement, useState } from "react"; import DashboardMode from "Common/Types/Dashboard/DashboardMode"; import MoreMenu from "Common/UI/Components/MoreMenu/MoreMenu"; @@ -55,36 +55,33 @@ const DashboardToolbar: FunctionComponent = ( ); return ( -
+
{/* Single row: Dashboard name + time range + variables + action buttons */} -
-
-

+
+
+

{props.dashboardName}

{isEditMode && ( - - + + Editing )} - {hasComponents && !isEditMode && ( - - {props.dashboardViewConfig.components.length} widget - {props.dashboardViewConfig.components.length !== 1 ? "s" : ""} - - )} + {/* Refreshing indicator */} + {props.isRefreshing && + props.autoRefreshInterval !== AutoRefreshInterval.OFF && ( + + + Refreshing + + )} +
- {/* Time range + variables inline (only when components exist and not in edit mode) */} +
+ {/* Time range + variables (only when components exist and not in edit mode) */} {hasComponents && !isEditMode && ( <> -
{ @@ -97,7 +94,7 @@ const DashboardToolbar: FunctionComponent = ( props.variables.length > 0 && props.onVariableValueChange && ( <> -
+
= ( )} - {/* Refreshing indicator */} - {props.isRefreshing && - props.autoRefreshInterval !== AutoRefreshInterval.OFF && ( - - - Refreshing - - )} -
- {!isSaving && ( -
+
{isEditMode ? ( <> @@ -209,27 +196,33 @@ const DashboardToolbar: FunctionComponent = ( icon={IconProp.Refresh} title="Reset Zoom" buttonStyle={ButtonStyleType.HOVER_PRIMARY_OUTLINE} + buttonSize={ButtonSize.Small} onClick={props.onResetZoom} tooltip="Reset to original time range" /> )} - {/* Auto-refresh dropdown */} - {hasComponents && ( - - {Object.values(AutoRefreshInterval).map( + + + + {hasComponents && + Object.values(AutoRefreshInterval).map( (interval: AutoRefreshInterval) => { return ( { props.onAutoRefreshIntervalChange(interval); }} @@ -237,25 +230,7 @@ const DashboardToolbar: FunctionComponent = ( ); }, )} - - )} - -
@@ -267,6 +242,7 @@ const DashboardToolbar: FunctionComponent = ( Saving...
)} +

{showCancelModal ? ( diff --git a/Common/UI/Components/Button/Button.tsx b/Common/UI/Components/Button/Button.tsx index de2250a2a3..815e0956ed 100644 --- a/Common/UI/Components/Button/Button.tsx +++ b/Common/UI/Components/Button/Button.tsx @@ -193,7 +193,7 @@ const Button: FunctionComponent = ({ } if (buttonStyle === ButtonStyleType.ICON) { - buttonStyleCssClass = `rounded-md bg-white text-gray-600 ${ + buttonStyleCssClass = `rounded-md bg-transparent text-gray-600 ${ disabled ? "hover:text-gray-900" : "" } focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`; }