getBlockClass()function

getBlockClass(variants: BlockVariants): string
ParamType
variantsBlockVariants
Variants for block level elements. required
Return
string
A space-separated className string combining the block class and resolved variant classes.

Get the combined className string for a block from its styling variants.

Composes the base block class and tint ladder with the colour, space, typography, and width variant helpers, so anything that wants block-level styling can apply it.

Examples

getBlockClass({ space: "large" }) // "block tint …"