-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Show the block styles in the block inspector #10543
Conversation
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 part looks great 💯, please wait for the design feedback before proceeding.
I love how composable Gutenberg is, one component which can be reused in so many places ❤️
{ ( fills ) => ! isEmpty( fills ) && ( | ||
<div><InspectorControls.Slot /></div> | ||
{ !! blockType.styles && ( | ||
<div className="editor-block-inspector__styles"> |
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.
Minor: We put a class name inside div
in here and inside PanelBody
for the advanced controls. Is it possible to use a common approach? It would be nice to put it inside PabelBody
as we probably will want to remove those wrapping div
elements at some point. It's NOT a blocker :)
@@ -46,3 +46,7 @@ | |||
width: $icon-button-size; | |||
height: $icon-button-size-small; | |||
} | |||
|
|||
.editor-block-inspector__styles .editor-block-styles__item { | |||
width: 100%; |
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.
Glad it only took this to work :)
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.
I love how composable Gutenberg is, one component which can be reused in so many places ❤️
Yeah :)
"Styles" should probably be placed at the top of all panels. |
9c542bf
to
4468a54
Compare
closes #10520
This PR adds the styles selector to the block inspector like shown in this screenshot.