getPaddingClass()function
getPaddingClass({ padding }: PaddingVariants): string | undefined| Param | Type | |
|---|---|---|
variants | PaddingVariants | Variant props for the block-padding (top + bottom) of a component, e.g. padding="large". required |
.padding | PaddingVariant | 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"