From 5cc76794a71584e26b1ec699c1dc1713d8a986c9 Mon Sep 17 00:00:00 2001 From: Heather Buchel Date: Tue, 22 Aug 2023 13:40:06 -0400 Subject: [PATCH] fix(ui): add backgroundColor token for default Button style (#4366) * fix(ui): add backgroundColor token for default Button style * Create chatty-terms-brake.md --------- Co-authored-by: Heather Buchel --- .changeset/chatty-terms-brake.md | 5 +++++ docs/__tests__/__snapshots__/cssvars-table.test.ts.snap | 4 ++++ .../components/button/examples/ButtonThemeExample.tsx | 5 ++++- packages/ui/src/theme/__tests__/defaultTheme.test.ts | 1 + packages/ui/src/theme/__tests__/overrides.test.ts | 1 + packages/ui/src/theme/css/component/button.scss | 4 +++- packages/ui/src/theme/tokens/components/button.ts | 2 ++ 7 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .changeset/chatty-terms-brake.md diff --git a/.changeset/chatty-terms-brake.md b/.changeset/chatty-terms-brake.md new file mode 100644 index 00000000000..20d65ccb2cb --- /dev/null +++ b/.changeset/chatty-terms-brake.md @@ -0,0 +1,5 @@ +--- +"@aws-amplify/ui": patch +--- + +fix(ui): add backgroundColor token for default Button style diff --git a/docs/__tests__/__snapshots__/cssvars-table.test.ts.snap b/docs/__tests__/__snapshots__/cssvars-table.test.ts.snap index 3ab3d410475..d1e3d4375f1 100644 --- a/docs/__tests__/__snapshots__/cssvars-table.test.ts.snap +++ b/docs/__tests__/__snapshots__/cssvars-table.test.ts.snap @@ -926,6 +926,10 @@ exports[`CSS Variables Table 1`] = ` \\"variable\\": \\"--amplify-components-button-active-color\\", \\"value\\": \\"var(--amplify-colors-font-active)\\" }, + { + \\"variable\\": \\"--amplify-components-button-background-color\\", + \\"value\\": \\"transparent\\" + }, { \\"variable\\": \\"--amplify-components-button-border-color\\", \\"value\\": \\"var(--amplify-components-fieldcontrol-border-color)\\" diff --git a/docs/src/pages/[platform]/components/button/examples/ButtonThemeExample.tsx b/docs/src/pages/[platform]/components/button/examples/ButtonThemeExample.tsx index 2d00a696b78..cf66469718a 100644 --- a/docs/src/pages/[platform]/components/button/examples/ButtonThemeExample.tsx +++ b/docs/src/pages/[platform]/components/button/examples/ButtonThemeExample.tsx @@ -13,7 +13,9 @@ const theme: Theme = { button: { // this will affect the font weight of all button variants fontWeight: { value: '{fontWeights.extrabold}' }, - + backgroundColor: { value: '#f1fff5' }, + borderColor: { value: '{colors.purple.80}' }, + color: { value: '{colors.purple.100}' }, outlined: { info: { borderColor: '{colors.purple.60}', @@ -59,6 +61,7 @@ const theme: Theme = { export const ButtonThemeExample = () => ( +