Skip to content

Commit

Permalink
Global Styles: Remove the extra unneeded color variations panel (#59718)
Browse files Browse the repository at this point in the history
* Global Styles: Remove the extra unneeded color variations panel

* remove the right one

Co-authored-by: scruffian <[email protected]>
Co-authored-by: ramonjd <[email protected]>
  • Loading branch information
3 people authored Mar 10, 2024
1 parent d181fe8 commit 65fd6b9
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
* Internal dependencies
*/
import { unlock } from '../../lock-unlock';
import ColorVariations from './variations/variations-color';
import { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';

const { useGlobalSetting } = unlock( blockEditorPrivateApis );
const mobilePopoverProps = { placement: 'bottom-start', offset: 8 };
Expand Down Expand Up @@ -47,12 +45,6 @@ export default function ColorPalettePanel( { name } ) {
'color.defaultPalette',
name
);
const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig( {
property: 'color',
filter: ( variation ) =>
variation?.settings?.color &&
Object.keys( variation?.settings?.color ).length,
} );
const isMobileViewport = useViewportMatch( 'small', '<' );
const popoverProps = isMobileViewport ? mobilePopoverProps : undefined;

Expand Down Expand Up @@ -85,9 +77,6 @@ export default function ColorPalettePanel( { name } ) {
popoverProps={ popoverProps }
/>
) }
{ !! colorVariations.length && (
<ColorVariations variations={ colorVariations } />
) }
<PaletteEdit
colors={ customColors }
onChange={ setCustomColors }
Expand Down

0 comments on commit 65fd6b9

Please sign in to comment.