getButtonClass()function
getButtonClass(variants: ButtonVariants): string
| Param | Type | |
|---|---|---|
variants | ButtonVariants | The button styling variants (flex, color, status, typography, plus button toggles). required |
.strong | boolean | This is the default button in a form and should be displayed stronger. |
.plain | boolean | Add plain styling (background only appears on hover or focus). |
.outline | boolean | Add outline styling (has no background until hover or focus). |
.small | boolean | Make the button appear smaller. |
.full | boolean | Fill the available width instead of sizing to content (buttons are content-width by default). |
| Return | |
|---|---|
string | A space-separated className string combining all the resolved variant classes. |
Get the full combined className string for a button from its styling variants.
Examples
getButtonClass({ color: "primary", small: true }) // "button …"