Skip to content

Commit

Permalink
Color panel hook: rename to remove ambiguity (#64993)
Browse files Browse the repository at this point in the history
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
  • Loading branch information
3 people authored Sep 3, 2024
1 parent 84b48f7 commit 559edae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { unlock } from '../../lock-unlock';

export function useHasColorPanel( settings ) {
const hasTextPanel = useHasTextPanel( settings );
const hasBackgroundPanel = useHasBackgroundPanel( settings );
const hasBackgroundPanel = useHasBackgroundColorPanel( settings );
const hasLinkPanel = useHasLinkPanel( settings );
const hasHeadingPanel = useHasHeadingPanel( settings );
const hasButtonPanel = useHasButtonPanel( settings );
Expand Down Expand Up @@ -97,7 +97,7 @@ export function useHasButtonPanel( settings ) {
);
}

export function useHasBackgroundPanel( settings ) {
export function useHasBackgroundColorPanel( settings ) {
const colors = useColorsPerOrigin( settings );
const gradients = useGradientsPerOrigin( settings );
return (
Expand Down Expand Up @@ -347,7 +347,7 @@ export default function ColorPanel( {
};

// BackgroundColor
const showBackgroundPanel = useHasBackgroundPanel( settings );
const showBackgroundPanel = useHasBackgroundColorPanel( settings );
const backgroundColor = decodeValue( inheritedValue?.color?.background );
const userBackgroundColor = decodeValue( value?.color?.background );
const gradient = decodeValue( inheritedValue?.color?.gradient );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import InspectorControls from '../inspector-controls';
import {
useHasColorPanel,
useHasTextPanel,
useHasBackgroundPanel,
useHasBackgroundColorPanel,
} from './color-panel.js';
import { useGlobalStyles } from './use-global-styles-context';

Expand Down Expand Up @@ -95,7 +95,7 @@ const ColorPanel = ( {
);

// BackgroundColor
const showBackgroundPanel = useHasBackgroundPanel( settings );
const showBackgroundPanel = useHasBackgroundColorPanel( settings );
const backgroundColor = decodeValue( inheritedValue?.color?.background );
const gradient = decodeValue( inheritedValue?.color?.gradient );
const setBackgroundColor = useCallback(
Expand Down

0 comments on commit 559edae

Please sign in to comment.