Skip to content

Commit

Permalink
Navigation: Remove ellipses as menu icon options for now (#44222)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen authored Sep 16, 2022
1 parent 68e7f56 commit 9e874a9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
* WordPress dependencies
*/
import { SVG, Rect } from '@wordpress/primitives';
import { Icon, menu, moreVertical, moreHorizontal } from '@wordpress/icons';
import { Icon, menu } from '@wordpress/icons';

export default function OverlayMenuIcon( { icon } ) {
if ( icon === 'menu' ) {
return <Icon icon={ menu } />;
} else if ( icon === 'more-vertical' ) {
return <Icon icon={ moreVertical } />;
} else if ( icon === 'more-horizontal' ) {
return <Icon icon={ moreHorizontal } />;
}

return (
Expand Down
10 changes: 0 additions & 10 deletions packages/block-library/src/navigation/edit/overlay-menu-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@ export default function OverlayMenuPreview( { setAttributes, hasIcon, icon } ) {
aria-label={ __( 'menu' ) }
label={ <OverlayMenuIcon icon="menu" /> }
/>
<ToggleGroupControlOption
value="more-vertical"
aria-label={ __( 'more vertical' ) }
label={ <OverlayMenuIcon icon="more-vertical" /> }
/>
<ToggleGroupControlOption
value="more-horizontal"
aria-label={ __( 'more horizontal' ) }
label={ <OverlayMenuIcon icon="more-horizontal" /> }
/>
</ToggleGroupControl>
</>
);
Expand Down
4 changes: 0 additions & 4 deletions packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -623,10 +623,6 @@ function render_block_core_navigation( $attributes, $content, $block ) {
if ( isset( $attributes['icon'] ) ) {
if ( 'menu' === $attributes['icon'] ) {
$toggle_button_icon = '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" /></svg>';
} elseif ( 'more-vertical' === $attributes['icon'] ) {
$toggle_button_icon = '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" /></svg>';
} elseif ( 'more-horizontal' === $attributes['icon'] ) {
$toggle_button_icon = '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z" /></svg>';
}
}
$toggle_button_content = $should_display_icon_label ? $toggle_button_icon : __( 'Menu' );
Expand Down

0 comments on commit 9e874a9

Please sign in to comment.