-
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
Docs: Add InspectorControls example #11736
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.
I tested this example. It works perfectly fine. I would vote to use a different control than alignment as noted in the comment.
This PR also needs rebase after docs folder structure changes.
source: 'html', | ||
selector: 'p', | ||
}, | ||
alignment: { |
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.
Can we use other control? We have a built-in support for alignment so this may be very confusing for developers. It is also included in block controls in core blocks which is the preferred way. Everything else is fine.
@ajitbohra Will you be able to rebase and update this PR or should it be closed? |
@chrisvanpatten yes will update the PR |
Now this PR also needs to be rebased :) |
@gziolo yes, my backlog 😅 |
What's the status here, can we land it? |
@mkaz and @nosolosw - we aligned the blocks tutorial to match with https://github.com/WordPress/gutenberg-examples repository. How does this PR fit to the current status? Should we maybe move it to |
It seems like it should go to this readme: https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/inspector-controls 👍 |
Awesome work @ajitbohra, this example should be very helpful 💯 |
* Docs: Add InspectorControls example * Update example * Fix example * Move the example to InsepectorContols README * Improve coding styles in the examples provided * Remove the example from block tutorial
Fixes #4478