Skip to content
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
Merged

Docs: document isDefault option for block styles #10207

merged 1 commit into from
Oct 8, 2018

Conversation

simison
Copy link
Member

@simison 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.

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 ajitbohra added the [Type] Developer Documentation Documentation for developers label Oct 1, 2018
Copy link
Member

@ajitbohra ajitbohra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simison Thank you 👍

@ajitbohra ajitbohra merged commit 377c222 into WordPress:master Oct 8, 2018
@mtias
Copy link
Member

mtias commented Oct 9, 2018

Thanks!

@simison simison deleted the patch-1 branch October 16, 2018 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants