Skip to content

Commit 559edae

Browse files
ramonjdciampo
andauthored
Color panel hook: rename to remove ambiguity (#64993)
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
1 parent 84b48f7 commit 559edae

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/block-editor/src/components/global-styles/color-panel.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { unlock } from '../../lock-unlock';
3333

3434
export function useHasColorPanel( settings ) {
3535
const hasTextPanel = useHasTextPanel( settings );
36-
const hasBackgroundPanel = useHasBackgroundPanel( settings );
36+
const hasBackgroundPanel = useHasBackgroundColorPanel( settings );
3737
const hasLinkPanel = useHasLinkPanel( settings );
3838
const hasHeadingPanel = useHasHeadingPanel( settings );
3939
const hasButtonPanel = useHasButtonPanel( settings );
@@ -97,7 +97,7 @@ export function useHasButtonPanel( settings ) {
9797
);
9898
}
9999

100-
export function useHasBackgroundPanel( settings ) {
100+
export function useHasBackgroundColorPanel( settings ) {
101101
const colors = useColorsPerOrigin( settings );
102102
const gradients = useGradientsPerOrigin( settings );
103103
return (
@@ -347,7 +347,7 @@ export default function ColorPanel( {
347347
};
348348

349349
// BackgroundColor
350-
const showBackgroundPanel = useHasBackgroundPanel( settings );
350+
const showBackgroundPanel = useHasBackgroundColorPanel( settings );
351351
const backgroundColor = decodeValue( inheritedValue?.color?.background );
352352
const userBackgroundColor = decodeValue( value?.color?.background );
353353
const gradient = decodeValue( inheritedValue?.color?.gradient );

packages/block-editor/src/components/global-styles/color-panel.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import InspectorControls from '../inspector-controls';
1818
import {
1919
useHasColorPanel,
2020
useHasTextPanel,
21-
useHasBackgroundPanel,
21+
useHasBackgroundColorPanel,
2222
} from './color-panel.js';
2323
import { useGlobalStyles } from './use-global-styles-context';
2424

@@ -95,7 +95,7 @@ const ColorPanel = ( {
9595
);
9696

9797
// BackgroundColor
98-
const showBackgroundPanel = useHasBackgroundPanel( settings );
98+
const showBackgroundPanel = useHasBackgroundColorPanel( settings );
9999
const backgroundColor = decodeValue( inheritedValue?.color?.background );
100100
const gradient = decodeValue( inheritedValue?.color?.gradient );
101101
const setBackgroundColor = useCallback(

0 commit comments

Comments
 (0)