Skip to content

Commit

Permalink
Docs: document isDefault option for block styles (#10207)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
simison authored and ajitbohra committed Oct 8, 2018
1 parent 9d419fa commit 377c222
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/extensibility/extending-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ wp.blocks.registerBlockStyle( 'core/quote', {

The example above registers a block style variation named `fancy-quote` to the `core/quote` block. When the user selects this block style variation from the styles selector, an `is-style-fancy-quote` className will be added to the block's wrapper.

By adding `isDefault: true`, you can make registered style variation to be active by default when a block is inserted.

### Filters

Extending blocks can involve more than just providing alternative styles, in this case, you can use one of the following filters to extend the block settings.
Expand Down

0 comments on commit 377c222

Please sign in to comment.