Skip to content

Commit

Permalink
Update icons for off-canvas navigation (#47337)
Browse files Browse the repository at this point in the history
* Update icon for page list item

* Remove context and update icon from page list

* Update nav-submenu icon

* Add context for navigation submenu
  • Loading branch information
richtabor authored Jan 26, 2023
1 parent 520c846 commit 4b77cda
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 8 additions & 2 deletions packages/block-library/src/navigation-submenu/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { addSubmenu } from '@wordpress/icons';
import { page, addSubmenu } from '@wordpress/icons';

/**
* Internal dependencies
Expand All @@ -17,7 +17,13 @@ const { name } = metadata;
export { metadata, name };

export const settings = {
icon: addSubmenu,
icon: ( { context } ) => {
if ( context === 'list-view' ) {
return page;
}

return addSubmenu;
},

__experimentalLabel: ( { label } ) => label,

Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/page-list-item/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { pages as icon } from '@wordpress/icons';
import { page as icon } from '@wordpress/icons';

/**
* Internal dependencies
Expand Down
10 changes: 2 additions & 8 deletions packages/block-library/src/page-list/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { pages, update } from '@wordpress/icons';
import { pages } from '@wordpress/icons';

/**
* Internal dependencies
Expand All @@ -15,13 +15,7 @@ const { name } = metadata;
export { metadata, name };

export const settings = {
icon: ( { context } ) => {
if ( context === 'list-view' ) {
return update;
}

return pages;
},
icon: pages,
example: {},
edit,
};
Expand Down

1 comment on commit 4b77cda

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 4b77cda.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4016965022
📝 Reported issues:

Please sign in to comment.