Skip to content

Commit

Permalink
"Edit" instead of color count
Browse files Browse the repository at this point in the history
  • Loading branch information
richtabor committed May 3, 2024
1 parent f9908e5 commit 974513a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions packages/edit-site/src/components/global-styles/palette.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ColorIndicator,
Button,
} from '@wordpress/components';
import { __, _n, sprintf } from '@wordpress/i18n';
import { __ } from '@wordpress/i18n';
import { shuffle } from '@wordpress/icons';
import { useMemo } from '@wordpress/element';
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
Expand Down Expand Up @@ -55,13 +55,7 @@ function Palette( { name } ) {
? '/colors/palette'
: '/blocks/' + encodeURIComponent( name ) + '/colors/palette';
const paletteButtonText =
colors.length > 0
? sprintf(
// Translators: %d: Number of palette colors.
_n( '%d color', '%d colors', colors.length ),
colors.length
)
: __( 'Add custom colors' );
colors.length > 0 ? __( 'Edit' ) : __( 'Add palette' );

return (
<VStack spacing={ 3 }>
Expand All @@ -87,7 +81,7 @@ function Palette( { name } ) {
</ColorIndicatorWrapper>
) ) }
</ZStack>
<FlexItem className="edit-site-global-styles-screen-colors__palette-count">
<FlexItem className="edit-site-global-styles-screen-colors__palette-text">
{ paletteButtonText }
</FlexItem>
</HStack>
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/global-styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
row-gap: calc(#{$grid-unit-05} * 3);
}

.edit-site-global-styles-screen-colors__palette-count {
.edit-site-global-styles-screen-colors__palette-text {
color: $gray-700;
}

Expand Down

0 comments on commit 974513a

Please sign in to comment.