You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add action tokens to PrimaryButton with brand base as fallback (#3081)
Fixes: #3072
[category:Components]
Release Note:
In `@workday/canvas-tokens-web@2.1.0` we've added new `action` tokens. In most cases you'll use `brand.primary.**` tokens to override theme. However, in the unique cases where you need additional control over styling `PrimaryButton` you can override `brand.action.**` tokens for more control. This PR ensures that `PrimaryButton` uses the new `action` tokens with `brand.base.**` being a fallback token. There should be no breaking changes as this is an addition to provide more control of theming our `PrimaryButton` component.
**Note: If `band.action.**` token is set at the theme level in the `CanvasProvider`, `brand.pimrary**` will be overwritten.**
Co-authored-by: manuel.carrera <manuel.carrera@workday.com>
Co-authored-by: @josh-bagwell <44883293+josh-bagwell@users.noreply.github.com>
The most common way to theme our buttons is to pass a `theme` object at the root level of the application via the `CanvasProvider`. In the example below, our buttons use our `brand.action.**` tokens with the fallback being `brand.primary.**`.
101
+
102
+
<ExampleCodeBlockcode={ThemeOverrides} />
103
+
97
104
### Accessible Use of the `as` Prop
98
105
99
106
Like many of our components, Buttons accept an `as` prop, which lets you change the underlying
0 commit comments