Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update icons for off-canvas navigation #47337

Merged
merged 4 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Comment on lines +21 to +22
Copy link
Contributor

Choose a reason for hiding this comment

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

Just noting this will apply in all list views not just the Nav offcanvas. Just being sure that's your intention.

}

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