controls/button/buttonVariant
Overview
Resolves a Button's two design axes (tone and emphasis) into the _Button* composition primitive that paints it. Shared by Button.vue (for the data-tone / data-emphasis attributes) and Button.theme.js (for the composed primitive and the inline-flow flag) so the mapping lives in exactly one place.
Methods
- resolveButtonVariant - Folds the explicit
tone/emphasisprops into a single resolved cell.
Types
ResolvedButtonVariant
ButtonEmphasis
ButtonEmphasis = "fill" | "outline" | "ghost" | "link"
ButtonTone
ButtonTone = "neutral" | "primary" | "destructive"
Source
client/lib/controls/button/buttonVariant.js:1