After a dirty PR (#83) this PR adds support to get the active block style based on the CSS classes.
It uses the CSS classes set for the block and matches the patter is-style-{style}. If none is found in the class names the method getStyle() falls back to the default style defined in the $styles property.
This should make it possible to alter the block / component markup based on the active style.
After a dirty PR (#83) this PR adds support to get the active block style based on the CSS classes.
It uses the CSS classes set for the block and matches the patter
is-style-{style}
. If none is found in the class names the methodgetStyle()
falls back to the default style defined in the $styles property.This should make it possible to alter the block / component markup based on the active style.