Skip to content

Commit b0da775

Browse files
authored
Merge pull request #2559 from bigcommerce/hunter/eng-10334-update-css-variable-names-for-text-color-in-catalyst
fix: text variable for button and button-link components
2 parents f619642 + 03b35f7 commit b0da775

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

core/vibes/soul/primitives/button-link/index.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ export interface ButtonLinkProps extends ComponentPropsWithoutRef<typeof Link> {
2020
* --button-font-family: var(--font-family-body);
2121
* --button-primary-background: hsl(var(--primary));
2222
* --button-primary-background-hover: color-mix(in oklab, hsl(var(--primary)), white 75%);
23-
* --button-primary-text: hsl(var(--foreground));
23+
* --button-primary-foreground: hsl(var(--foreground));
2424
* --button-primary-border: hsl(var(--primary));
2525
* --button-secondary-background: hsl(var(--foreground));
2626
* --button-secondary-background-hover: hsl(var(--background));
27-
* --button-secondary-text: hsl(var(--background));
27+
* --button-secondary-foreground: hsl(var(--background));
2828
* --button-secondary-border: hsl(var(--foreground));
2929
* --button-tertiary-background: hsl(var(--background));
3030
* --button-tertiary-background-hover: hsl(var(--contrast-100));
31-
* --button-tertiary-text: hsl(var(--foreground));
31+
* --button-tertiary-foreground: hsl(var(--foreground));
3232
* --button-tertiary-border: hsl(var(--contrast-200));
3333
* --button-ghost-background: transparent;
3434
* --button-ghost-background-hover: hsl(var(--foreground) / 5%);
35-
* --button-ghost-text: hsl(var(--foreground));
35+
* --button-ghost-foreground: hsl(var(--foreground));
3636
* --button-ghost-border: transparent;
3737
* }
3838
* ```
@@ -52,13 +52,13 @@ export function ButtonLink({
5252
'relative z-0 inline-flex h-fit select-none items-center justify-center overflow-hidden border text-center font-[family-name:var(--button-font-family)] font-semibold leading-normal after:absolute after:inset-0 after:-z-10 after:-translate-x-[105%] after:transition-[opacity,transform] after:duration-300 after:[animation-timing-function:cubic-bezier(0,0.25,0,1)] hover:after:translate-x-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--button-focus,hsl(var(--primary)))] focus-visible:ring-offset-2',
5353
{
5454
primary:
55-
'border-[var(--button-primary-border,hsl(var(--primary)))] bg-[var(--button-primary-background,hsl(var(--primary)))] text-[var(--button-primary-text)] after:bg-[var(--button-primary-background-hover,color-mix(in_oklab,hsl(var(--primary)),white_75%))]',
55+
'border-[var(--button-primary-border,hsl(var(--primary)))] bg-[var(--button-primary-background,hsl(var(--primary)))] text-[var(--button-primary-foreground,hsl(var(--foreground)))] after:bg-[var(--button-primary-background-hover,color-mix(in_oklab,hsl(var(--primary)),white_75%))]',
5656
secondary:
57-
'border-[var(--button-secondary-border,hsl(var(--foreground)))] bg-[var(--button-secondary-background,hsl(var(--foreground)))] text-[var(--button-secondary-text,hsl(var(--background)))] after:bg-[var(--button-secondary-background-hover,hsl(var(--background)))]',
57+
'border-[var(--button-secondary-border,hsl(var(--foreground)))] bg-[var(--button-secondary-background,hsl(var(--foreground)))] text-[var(--button-secondary-foreground,hsl(var(--background)))] after:bg-[var(--button-secondary-background-hover,hsl(var(--background)))]',
5858
tertiary:
59-
'border-[var(--button-tertiary-border,hsl(var(--contrast-200)))] bg-[var(--button-tertiary-background,hsl(var(--background)))] text-[var(--button-tertiary-text,hsl(var(--foreground)))] after:bg-[var(--button-tertiary-background-hover,hsl(var(--contrast-100)))]',
59+
'border-[var(--button-tertiary-border,hsl(var(--contrast-200)))] bg-[var(--button-tertiary-background,hsl(var(--background)))] text-[var(--button-tertiary-foreground,hsl(var(--foreground)))] after:bg-[var(--button-tertiary-background-hover,hsl(var(--contrast-100)))]',
6060
ghost:
61-
'border-[var(--button-ghost-border,transparent)] bg-[var(--button-ghost-background,transparent)] text-[var(--button-ghost-text,hsl(var(--foreground)))] after:bg-[var(--button-ghost-background-hover,hsl(var(--foreground)/5%))]',
61+
'border-[var(--button-ghost-border,transparent)] bg-[var(--button-ghost-background,transparent)] text-[var(--button-ghost-foreground,hsl(var(--foreground)))] after:bg-[var(--button-ghost-background-hover,hsl(var(--foreground)/5%))]',
6262
}[variant],
6363
{
6464
'x-small': 'min-h-8 text-xs',

core/vibes/soul/primitives/button/index.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ export interface ButtonProps extends ComponentPropsWithoutRef<'button'> {
2020
* --button-font-family: var(--font-family-body);
2121
* --button-primary-background: hsl(var(--primary));
2222
* --button-primary-background-hover: color-mix(in oklab, hsl(var(--primary)), white 75%);
23-
* --button-primary-text: hsl(var(--foreground));
23+
* --button-primary-foreground: hsl(var(--foreground));
2424
* --button-primary-border: hsl(var(--primary));
2525
* --button-secondary-background: hsl(var(--foreground));
2626
* --button-secondary-background-hover: hsl(var(--background));
27-
* --button-secondary-text: hsl(var(--background));
27+
* --button-secondary-foreground: hsl(var(--background));
2828
* --button-secondary-border: hsl(var(--foreground));
2929
* --button-tertiary-background: hsl(var(--background));
3030
* --button-tertiary-background-hover: hsl(var(--contrast-100));
31-
* --button-tertiary-text: hsl(var(--foreground));
31+
* --button-tertiary-foreground: hsl(var(--foreground));
3232
* --button-tertiary-border: hsl(var(--contrast-200));
3333
* --button-ghost-background: transparent;
3434
* --button-ghost-background-hover: hsl(var(--foreground) / 5%);
35-
* --button-ghost-text: hsl(var(--foreground));
35+
* --button-ghost-foreground: hsl(var(--foreground));
3636
* --button-ghost-border: transparent;
3737
* --button-loader-icon: hsl(var(--foreground));
3838
* --button-danger-background: color-mix(in oklab, hsl(var(--error)), white 30%);
@@ -61,13 +61,13 @@ export function Button({
6161
'relative z-0 inline-flex h-fit cursor-pointer select-none items-center justify-center overflow-hidden border text-center font-[family-name:var(--button-font-family,var(--font-family-body))] font-semibold leading-normal after:absolute after:inset-0 after:-z-10 after:-translate-x-[105%] after:duration-300 after:[animation-timing-function:cubic-bezier(0,0.25,0,1)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--button-focus,hsl(var(--primary)))] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-30',
6262
{
6363
primary:
64-
'border-[var(--button-primary-border,hsl(var(--primary)))] bg-[var(--button-primary-background,hsl(var(--primary)))] text-[var(--button-primary-text,hsl(var(--foreground)))] after:bg-[var(--button-primary-background-hover,color-mix(in_oklab,hsl(var(--primary)),white_75%))]',
64+
'border-[var(--button-primary-border,hsl(var(--primary)))] bg-[var(--button-primary-background,hsl(var(--primary)))] text-[var(--button-primary-foreground,hsl(var(--foreground)))] after:bg-[var(--button-primary-background-hover,color-mix(in_oklab,hsl(var(--primary)),white_75%))]',
6565
secondary:
66-
'border-[var(--button-secondary-border,hsl(var(--foreground)))] bg-[var(--button-secondary-background,hsl(var(--foreground)))] text-[var(--button-secondary-text,hsl(var(--background)))] after:bg-[var(--button-secondary-background-hover,hsl(var(--background)))]',
66+
'border-[var(--button-secondary-border,hsl(var(--foreground)))] bg-[var(--button-secondary-background,hsl(var(--foreground)))] text-[var(--button-secondary-foreground,hsl(var(--background)))] after:bg-[var(--button-secondary-background-hover,hsl(var(--background)))]',
6767
tertiary:
68-
'border-[var(--button-tertiary-border,hsl(var(--contrast-200)))] bg-[var(--button-tertiary-background,hsl(var(--background)))] text-[var(--button-tertiary-text,hsl(var(--foreground)))] after:bg-[var(--button-tertiary-background-hover,hsl(var(--contrast-100)))]',
68+
'border-[var(--button-tertiary-border,hsl(var(--contrast-200)))] bg-[var(--button-tertiary-background,hsl(var(--background)))] text-[var(--button-tertiary-foreground,hsl(var(--foreground)))] after:bg-[var(--button-tertiary-background-hover,hsl(var(--contrast-100)))]',
6969
ghost:
70-
'border-[var(--button-ghost-border,transparent)] bg-[var(--button-ghost-background,transparent)] text-[var(--button-ghost-text,hsl(var(--foreground)))] after:bg-[var(--button-ghost-background-hover,hsl(var(--foreground)/5%))]',
70+
'border-[var(--button-ghost-border,transparent)] bg-[var(--button-ghost-background,transparent)] text-[var(--button-ghost-foreground,hsl(var(--foreground)))] after:bg-[var(--button-ghost-background-hover,hsl(var(--foreground)/5%))]',
7171
danger:
7272
'border-[var(--button-danger-border,color-mix(in_oklab,hsl(var(--error)),white_30%))] bg-[var(--button-danger-background,color-mix(in_oklab,hsl(var(--error)),white_30%))] text-[var(--button-danger-foreground)] after:bg-[var(--button-danger-background-hover,color-mix(in_oklab,hsl(var(--error)),white_75%))]',
7373
}[variant],

0 commit comments

Comments
 (0)