tokenStylesForIntent
Commons
stable
Build a CSS-vars override map (background-color + color) for a given intent and interaction role. Returns the correct token expressions for default, hover, active, and disabled states.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- intentrequisTIntent
- The semantic intent: "primary", "secondary", "ghost", "success", "warning", "danger", "info", or "neutral".
- roleTBgFgRoleBG_FG_ROLE.DEFAULT
- The interaction state: "default" | "hover" | "active" | "disabled". Defaults to "default".
API
Valeur de retour
La valeur retournée par cet util.
- An object with two keys — `background-color` and `color` — each holding a `var(--origam-color__…)` expression. Bind it directly as a `:style` object.
Usage
Exemples
Extraits de code prêts à coller.
Apply intent surface styles