Describe the bug
I am tying to add a tip style to the paragraph block by using wp.blocks.registerBlockStyle( 'core/paragraph', 'tip' ), but within both the editor and the front end, the class added ends up being is-style-undefined. I have also tried the example provided in the documentation for the quote, but am seeing the same issue.

I know the script I've added is firing because I see I have the option to add a style:

but it isn't consistent with blocks that have the styles object at time of registration (e.g. core/button):

To Reproduce
wp.blocks.registerBlockStyle( 'core/paragraph', 'tip' ); to a theme or plugin.tip.is-style-undefined is applied to the block.Expected behavior
Adding a tip style should add the is-style-tip class to the paragraph block when it is selected.
Screenshots
See above.
Additional context
@carrieforde the documentation for wp.blocks.registerBlockStyle needs updating. A plain string doesn't work for the second argument. Try the following instead and you should get the is-style-tip style:
wp.blocks.registerBlockStyle( 'core/paragraph', {
name: 'tip',
label: 'Tip'
} );
I've got a PR open to update that documentation page: https://github.com/WordPress/gutenberg/pull/10163
@joemaller Thanks so much. 馃挴 That most certainly did the trick.
Most helpful comment
@carrieforde the documentation for
wp.blocks.registerBlockStyleneeds updating. A plain string doesn't work for the second argument. Try the following instead and you should get theis-style-tipstyle:I've got a PR open to update that documentation page: https://github.com/WordPress/gutenberg/pull/10163