Skip to content

Commit

Permalink
Refactor clear button in ColorPalette component
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishit30G committed Feb 7, 2025
1 parent 3f0a805 commit 208c842
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/color-palette/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,11 @@ function UnforwardedColorPalette(
value,
};

const actions = !! clearable && (
const actions = (
<CircularOptionPicker.ButtonAction
onClick={ clearColor }
accessibleWhenDisabled
disabled={ ! value }
disabled={ ! value || ! clearable }
>
{ __( 'Clear' ) }
</CircularOptionPicker.ButtonAction>
Expand Down

0 comments on commit 208c842

Please sign in to comment.