gutenburg block, preset custom style when block is selected code example
Example: find block styles gutenberg
wp.domReady(() => {
// find blocks styles
wp.blocks.getBlockTypes().forEach((block) => {
if (_.isArray(block['styles'])) {
console.log(block.name, _.pluck(block['styles'], 'name'));
}
});
});