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: document `isDefault` option for block styles #10207

Merged
merged 1 commit into from Oct 8, 2018

Conversation

Projects
None yet
3 participants
@simison
Contributor

simison commented Sep 27, 2018

Description

Documents isDefault option when adding block style variations with wp.blocks.registerBlockStyle()

Example.

I'm building a custom block with different styles and I wanted one of the styles to be active by default. I had to go searching from code if such a feature exists.

How has this been tested?

N/A

Types of changes

Documentation update.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
Docs: document `isDefault` option for block styles
Documents `isDefault` option when adding block style variations with `wp.blocks.registerBlockStyle()`

[Example](https://github.com/WordPress/gutenberg/blob/3b6c167cab50e77c44b21c74e3dd2bdf8b890ff4/packages/block-library/src/separator/index.js#L20-L24).

I'm building a custom block with different styles and I wanted one of the styles to be active by default. I had to go searching from code if such a feature exists.
@ajitbohra

@simison Thank you 👍

@ajitbohra ajitbohra merged commit 377c222 into WordPress:master Oct 8, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mtias

This comment has been minimized.

Show comment
Hide comment
@mtias

mtias Oct 9, 2018

Contributor

Thanks!

Contributor

mtias commented Oct 9, 2018

Thanks!

@simison simison deleted the simison:patch-1 branch Oct 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment