-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: Refactored Button styles to use
createStyles
utility (#2285)
Style refactor for buttons to work with new theming, branding, tokens, createStyles utility and `cs` prop. Fixes: #2274 We want to more easily apply theming to Buttons and the styles need to be refactored to more easily apply those themed styles with new tokens. [category:Components] ### BREAKING CHANGES - We refactored how we styled Buttons to use our `createStyles` utility function. We don't anticipate this as a breaking change but, there may be slight changes to visual test. - Icons will no longer be "filled" on toggle. This decision was made to not have the existing icon look different in the toggled state from default state. - `PrimaryButton`: On the `inverse` variant, the focus ring is now consistent with the default variant of `PrimaryButton`. This will visually change the `inverse` variant to have a larger appearance when focused. - `colors` will no longer support the `focusRing` option: ```tsx import {focusRing} from '@workday/canvas-kit-react/common'; // before <PrimaryButton colors={{ // other colors focus: { // other colors focusRing: focusRing(/* options */) } }} /> // after <PrimaryButton colors={{ // other colors focus: { // other colors } }} css={{ ':focus-visible': focusRing(/* options */) }} />; ```
- Loading branch information
1 parent
aa04f7e
commit 9a4ff36
Showing
26 changed files
with
960 additions
and
977 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
export {PrimaryButton, PrimaryButtonProps} from './lib/PrimaryButton'; | ||
export {SecondaryButton, SecondaryButtonProps} from './lib/SecondaryButton'; | ||
export {TertiaryButton, TertiaryButtonProps} from './lib/TertiaryButton'; | ||
export {DeleteButton, DeleteButtonProps} from './lib/DeleteButton'; | ||
export { | ||
DeprecatedButton as deprecated_Button, | ||
DeprecatedButtonProps, | ||
} from './lib/deprecated_Button'; | ||
export {ToolbarIconButton, ToolbarIconButtonProps} from './lib/ToolbarIconButton'; | ||
export {ToolbarDropdownButton, ToolbarDropdownButtonProps} from './lib/ToolbarDropdownButton'; | ||
export {Hyperlink, HyperlinkProps} from './lib/Hyperlink'; | ||
export { | ||
BaseButton, | ||
ButtonContainerProps, | ||
BaseButtonProps, | ||
getMinWidthStyles, | ||
getPaddingStyles, | ||
} from './lib/BaseButton'; | ||
export {ExternalHyperlink, ExternalHyperlinkProps} from './lib/ExternalHyperlink'; | ||
export * from './lib/types'; | ||
export * from './lib/PrimaryButton'; | ||
export * from './lib/SecondaryButton'; | ||
export * from './lib/TertiaryButton'; | ||
export * from './lib/DeleteButton'; | ||
export * from './lib/BaseButton'; | ||
export * from './lib/ToolbarDropdownButton'; | ||
export * from './lib/ToolbarIconButton'; | ||
export * from './lib/types'; |
Oops, something went wrong.