-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Global Styles]: Add block icon next to blocks list #36520
Conversation
Size Change: +15 B (0%) Total Size: 1.09 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good 👍
Nice, thanks! |
I was also looking into this earlier, based on the meetup notes 😄 I noticed that gutenberg/packages/edit-site/src/components/global-styles/navigation-button.js Lines 22 to 29 in f323d96
So there might be an easier way: diff --git a/packages/edit-site/src/components/global-styles/screen-block-list.js b/packages/edit-site/src/components/global-styles/screen-block-list.js
index 5cc822ff4d..740faecd24 100644
--- a/packages/edit-site/src/components/global-styles/screen-block-list.js
+++ b/packages/edit-site/src/components/global-styles/screen-block-list.js
@@ -28,7 +28,7 @@ function BlockMenuItem( { block } ) {
}
return (
- <NavigationButton path={ '/blocks/' + block.name }>
+ <NavigationButton icon={ block.icon } path={ '/blocks/' + block.name }>
{ block.title }
</NavigationButton>
); Just in case we wanna de-duplicate some functionality 😉 |
@ockham If I remember properly the |
This PR just adds the block icon next to the blocks list in Global Styles sidebar.