getPaddingClass()function

getPaddingClass({ padding }: PaddingVariants): string | undefined
ParamType
optionsPaddingVariants
Variant props for the block-padding (top + bottom) of a component, e.g. padding="large". required
    .paddingSpaceValue
Block-padding (top + bottom) of the element.
Return
string | undefined
The padding class string, or undefined when no padding is set.

Get the block-padding class for a component from its padding variant prop.

Examples

getPaddingClass({ padding: "large" }) // "large"