fix(badge): add type variant for dark mode contrast#3025
Merged
waleedlatif1 merged 2 commits intostagingfrom Jan 27, 2026
Merged
fix(badge): add type variant for dark mode contrast#3025waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryAdded a new
Confidence Score: 4.5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Badge as Badge Component
participant CVA as CVA Variants
participant CSS as CSS Variables
participant UI as UI (Dark Mode)
Dev->>Badge: Add variant='type' prop
Badge->>CVA: Lookup 'type' variant
CVA->>CSS: Apply bg-[var(--surface-4)]
CVA->>CSS: Apply dark:bg-[var(--surface-6)]
CSS->>UI: Light mode: #f5f5f5 (surface-4)
CSS->>UI: Dark mode: #454545 (surface-6)
UI-->>Dev: Badge visible on surface-4 header (#292929)
Note over Badge,UI: Old behavior: default variant used surface-4 in dark mode
Note over Badge,UI: New behavior: type variant uses surface-6 for contrast
|
Contributor
Additional Comments (1)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/sim/components/emcn/components/badge/badge.tsx
Line: 84:94
Comment:
TSDoc should list the new `type` variant alongside other bordered variants
```suggestion
* @remarks
* Supports two categories of variants:
* - **Bordered**: `default`, `outline`, `type` - traditional badges with borders
* - **Status colors**: `green`, `red`, `gray`, `blue`, `blue-secondary`, `purple`,
* `orange`, `amber`, `teal`, `cyan`, `gray-secondary` - borderless colored badges
*
* Status color variants can display a dot indicator via the `dot` prop.
* All variants support an optional `icon` prop for leading icons.
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
typevariant to Badge component for better dark mode contrast on surface-4 backgroundsType of Change
Testing
Tested manually
Checklist