From 5c20cb598ee77aaac4a18a0742b56a74f5fb4403 Mon Sep 17 00:00:00 2001 From: CTomlyn Date: Wed, 18 Sep 2024 07:00:15 -0700 Subject: [PATCH] #2158 Update palette open/close icon in toolbar (#2159) Signed-off-by: CTomlyn --- canvas_modules/common-canvas/src/common-canvas/cc-toolbar.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/canvas_modules/common-canvas/src/common-canvas/cc-toolbar.jsx b/canvas_modules/common-canvas/src/common-canvas/cc-toolbar.jsx index 3a94f4a77c..d69a259a30 100644 --- a/canvas_modules/common-canvas/src/common-canvas/cc-toolbar.jsx +++ b/canvas_modules/common-canvas/src/common-canvas/cc-toolbar.jsx @@ -27,6 +27,7 @@ import { ERROR, WARNING, SUCCESS, INFO, PALETTE_LAYOUT_NONE, NOTIFICATION_ICON_CLASS, TOOLBAR_TOGGLE_NOTIFICATION_PANEL, TOOLBAR_LAYOUT_TOP, TOOLBAR_TOGGLE_PALETTE } from "../common-canvas/constants/canvas-constants"; +import { SidePanelOpenFilled, SidePanelCloseFilled } from "@carbon/react/icons"; class CommonCanvasToolbar extends React.Component { constructor(props) { @@ -177,9 +178,10 @@ class CommonCanvasToolbar extends React.Component { // is to be performed. So add them as additional classes. Also, jest tests require them. // TODO - In next major release, remove "paletteClose-action" and "paletteOpen-action" const className = this.props.isPaletteOpen ? "closePalette-action paletteClose-action" : "openPalette-action paletteOpen-action"; + const icon = this.props.isPaletteOpen ? () : (); const togglePaletteAction = - { action: TOOLBAR_TOGGLE_PALETTE, label: paletteLabel, enable: true, + { action: TOOLBAR_TOGGLE_PALETTE, label: paletteLabel, enable: true, iconEnabled: icon, isSelected: this.props.isPaletteOpen, className }; const lbIdx = this.getToolIndexByAction(TOOLBAR_TOGGLE_PALETTE, leftBar);