Skip to content

feat(Badge): add new color variants#5178

Merged
francisco-guilherme merged 2 commits into
masterfrom
feat/badge_colors
May 26, 2026
Merged

feat(Badge): add new color variants#5178
francisco-guilherme merged 2 commits into
masterfrom
feat/badge_colors

Conversation

@plagoa

@plagoa plagoa commented May 26, 2026

Copy link
Copy Markdown
Contributor
image

Copilot AI review requested due to automatic review settings May 26, 2026 14:27
@plagoa plagoa requested a review from a team as a code owner May 26, 2026 14:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new semantic color variants to HvBadge styling for the Pentaho theme and documents them in Storybook and the docs site.

Changes:

  • Added Pentaho theme styles for HvBadge when color is positive, warning, or negative.
  • Updated the Badge Storybook “Test” story to showcase the new variants.
  • Updated Badge documentation examples to include warning and negative (and minor formatting cleanup).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/core/src/themes/pentaho.ts Adds positive/warning/negative badge color styling (text + dimmed background) for non-empty badges.
packages/core/src/Badge/Badge.stories.tsx Extends the visual test story with the new badge color variants.
apps/docs/src/content/components/badge.mdx Updates docs examples to demonstrate the new badge colors and simplifies componentProps formatting.

backgroundColor: theme.colors.primaryDimmed,
},
...Object.fromEntries(
(["primary", "positive", "warning", "negative"] as const).map(

@zettca zettca May 26, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we leverage semaColors, aligning this with HvAvatar?
we can keep info undocumented if you think it's better

Suggested change
(["primary", "positive", "warning", "negative"] as const).map(
(["primary", ...semaColors]).map(

@francisco-guilherme francisco-guilherme merged commit 2ca6cd8 into master May 26, 2026
17 checks passed
@francisco-guilherme francisco-guilherme deleted the feat/badge_colors branch May 26, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants