-
Notifications
You must be signed in to change notification settings - Fork 82
[LG-5748] fix: Fix Text and Border Color Variants #3328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||||||
| --- | ||||||||||
| '@leafygreen-ui/tokens': patch | ||||||||||
| --- | ||||||||||
|
|
||||||||||
| Fixed the text success and error text color variants. Added OnSuccess, OnError, and OnSuccess border color variants, and removed the Success border color variant. | ||||||||||
|
||||||||||
| Fixed the text success and error text color variants. Added OnSuccess, OnError, and OnSuccess border color variants, and removed the Success border color variant. | |
| Updated the Success and Error border color variants with new color values. Added new OnSuccess and OnError border color variants. Renamed the SuccessLink variant to OnSuccessLink. |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word "text" is duplicated in this sentence: "Fixed the text success and error text color variants." Should be "Fixed the success and error text color variants."
| Fixed the text success and error text color variants. Added OnSuccess, OnError, and OnSuccess border color variants, and removed the Success border color variant. | |
| Fixed the success and error text color variants. Added OnSuccess, OnError, and OnSuccess border color variants, and removed the Success border color variant. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,11 +69,21 @@ const darkModeBorderColors = { | |
| [InteractionState.Focus]: blue.light1, | ||
| }, | ||
| [Variant.Success]: { | ||
| [InteractionState.Default]: green.dark1, | ||
| [InteractionState.Hover]: green.dark1, | ||
| [InteractionState.Focus]: blue.light1, | ||
| }, | ||
| [Variant.Error]: { | ||
| [InteractionState.Default]: red.light1, | ||
| [InteractionState.Hover]: red.light1, | ||
| [InteractionState.Focus]: blue.light1, | ||
| }, | ||
| [Variant.OnSuccess]: { | ||
| [InteractionState.Default]: green.dark2, | ||
| [InteractionState.Hover]: green.dark2, | ||
| [InteractionState.Focus]: blue.light1, | ||
|
Comment on lines
+81
to
84
|
||
| }, | ||
| [Variant.Error]: { | ||
| [Variant.OnError]: { | ||
| [InteractionState.Default]: red.dark2, | ||
| [InteractionState.Hover]: red.dark2, | ||
| [InteractionState.Focus]: blue.light1, | ||
|
Comment on lines
+86
to
89
|
||
|
|
@@ -154,26 +164,36 @@ const darkModeTextColors = { | |
| [InteractionState.Hover]: black, | ||
| [InteractionState.Focus]: blue.dark2, | ||
| }, | ||
| [Variant.Disabled]: { | ||
| [InteractionState.Default]: gray.dark1, | ||
| [InteractionState.Hover]: gray.dark1, | ||
| [InteractionState.Focus]: gray.dark1, | ||
| }, | ||
| [Variant.Success]: { | ||
|
adamrasheed marked this conversation as resolved.
|
||
| [InteractionState.Default]: green.light1, | ||
| [InteractionState.Hover]: green.light1, | ||
| [InteractionState.Focus]: green.light1, | ||
| [InteractionState.Default]: green.light2, | ||
| [InteractionState.Hover]: green.light2, | ||
| [InteractionState.Focus]: green.light2, | ||
| }, | ||
| [Variant.Error]: { | ||
| [InteractionState.Default]: red.light1, | ||
| [InteractionState.Hover]: red.light1, | ||
| [InteractionState.Focus]: red.light1, | ||
| }, | ||
| [Variant.Disabled]: { | ||
| [InteractionState.Default]: gray.dark1, | ||
| [InteractionState.Hover]: gray.dark1, | ||
| [InteractionState.Focus]: gray.dark1, | ||
| [Variant.OnSuccess]: { | ||
| [InteractionState.Default]: green.light1, | ||
| [InteractionState.Hover]: green.light1, | ||
| [InteractionState.Focus]: green.light1, | ||
| }, | ||
| [Variant.SuccessLink]: { | ||
| [Variant.OnSuccessLink]: { | ||
| [InteractionState.Default]: green.light3, | ||
| [InteractionState.Hover]: green.light3, | ||
| [InteractionState.Focus]: green.light3, | ||
| }, | ||
| [Variant.OnError]: { | ||
| [InteractionState.Default]: red.light2, | ||
| [InteractionState.Hover]: red.light2, | ||
| [InteractionState.Focus]: red.light2, | ||
| }, | ||
| [Variant.Link]: { | ||
| [InteractionState.Default]: blue.light1, | ||
| [InteractionState.Hover]: blue.light1, | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -69,20 +69,30 @@ const lightModeBorderColors = { | |||||
| [InteractionState.Focus]: blue.light1, | ||||||
| }, | ||||||
| [Variant.Success]: { | ||||||
| [InteractionState.Default]: green.light2, | ||||||
| [InteractionState.Hover]: green.light2, | ||||||
| [InteractionState.Default]: green.dark1, | ||||||
| [InteractionState.Hover]: green.dark1, | ||||||
| [InteractionState.Focus]: blue.light1, | ||||||
| }, | ||||||
| [Variant.Error]: { | ||||||
| [InteractionState.Default]: red.light2, | ||||||
| [InteractionState.Hover]: red.light2, | ||||||
| [InteractionState.Default]: red.base, | ||||||
| [InteractionState.Hover]: red.base, | ||||||
| [InteractionState.Focus]: blue.light1, | ||||||
| }, | ||||||
| [Variant.Disabled]: { | ||||||
| [InteractionState.Default]: gray.light1, | ||||||
| [InteractionState.Hover]: gray.light1, | ||||||
| [InteractionState.Focus]: gray.light1, | ||||||
| }, | ||||||
| [Variant.OnSuccess]: { | ||||||
| [InteractionState.Default]: green.light2, | ||||||
| [InteractionState.Hover]: green.light2, | ||||||
| [InteractionState.Focus]: green.light2, | ||||||
|
||||||
| [InteractionState.Focus]: green.light2, | |
| [InteractionState.Focus]: blue.light1, |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The focus state for OnError border color uses red.light2 instead of blue.light1, which is inconsistent with other border color variants (Primary, Secondary, Tertiary, Success, Error) that all use blue.light1 for focus states. Consider changing line 94 to use blue.light1 for consistency.
| [InteractionState.Focus]: red.light2, | |
| [InteractionState.Focus]: blue.light1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changeset is marked as a
patchrelease, but it includes a breaking change. TheVariant.SuccessLinkenum value was removed and replaced withVariant.OnSuccessLink. This is a breaking change to the public API that will cause compilation errors for any consumers usingVariant.SuccessLink. According to semantic versioning, this should be amajorversion bump, not apatch. Change the first line to:'@leafygreen-ui/tokens': major