From b8bfe7174b7a6b499e2f34f34f71c2735ee6c5fb Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:25:12 +0300 Subject: [PATCH] PaletteEdit: Use `ItemGroup` and `Item`, and avoid custom styles (#66164) * PaletteEdit: Use Item directly * PaletteEdit: Cleanup legacy PaletteItem styles * CHANGELOG Co-authored-by: tyxla Co-authored-by: ciampo Co-authored-by: mirka <0mirka00@git.wordpress.org> --- packages/components/CHANGELOG.md | 4 ++ .../components/src/palette-edit/index.tsx | 9 ++- .../components/src/palette-edit/styles.ts | 68 +------------------ 3 files changed, 9 insertions(+), 72 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index f19e7f7eae7baa..d71f6ba7ce142f 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -6,6 +6,10 @@ - `ColorPalette`: prevent overflow of custom color button background ([#66152](https://github.com/WordPress/gutenberg/pull/66152)). +### Enhancements + +- `PaletteEdit`: use `Item` internally instead of custom styles ([#66164](https://github.com/WordPress/gutenberg/pull/66164)). + ## 28.10.0 (2024-10-16) ### Bug Fixes diff --git a/packages/components/src/palette-edit/index.tsx b/packages/components/src/palette-edit/index.tsx index 8bfcb7240b9ea4..570613e5378c10 100644 --- a/packages/components/src/palette-edit/index.tsx +++ b/packages/components/src/palette-edit/index.tsx @@ -24,7 +24,7 @@ import Button from '../button'; import { ColorPicker } from '../color-picker'; import { FlexItem } from '../flex'; import { HStack } from '../h-stack'; -import { ItemGroup } from '../item-group'; +import { Item, ItemGroup } from '../item-group'; import { VStack } from '../v-stack'; import GradientPicker from '../gradient-picker'; import ColorPalette from '../color-palette'; @@ -35,7 +35,6 @@ import { PaletteEditStyles, PaletteHeading, IndicatorStyled, - PaletteItem, NameContainer, NameInputControl, DoneButton, @@ -213,7 +212,7 @@ function Option< T extends PaletteElement >( { ); return ( - +