-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Fix missing buttons example #24249
Fix missing buttons example #24249
Conversation
The buttons block contains inner blocks of the type example: {
innerBlocks: [
{
name: 'core/button',
attributes: {
className: 'is-style-fill',
backgroundColor: 'vivid-green-cyan',
text: __( 'Call to Action' ),
},
},
],
}, If you want to show the example like in the screenshot, you just need to add an empty object: example: {}, |
@Soean thank you! i updated this PR to just pass the empty please let me know if there's any other changes i should make |
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 think it's good for the example preview. Thanks for contributing!
@@ -23,6 +23,7 @@ export const settings = { | |||
), | |||
icon, | |||
keywords: [ __( 'link' ) ], | |||
example: {}, |
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.
maybe we can be more creative and use something close to the two or three buttons pattern here.
Description
The buttons block is missing an example from the block inserter
The button block has an example, but it isn't used from the inserter
How has this been tested?
I forked and
git clone
'd the repo, built the plugin locally and loaded on my local dev WP running 5.4.2 and no other plugins, default themeScreenshots
Before
After
Types of changes
Enhancement: This makes sure that the buttons block preview shows an example
Checklist: