refactor(web): add a label variant to Badge (#13029)

Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
Julius MarmingeandClaude Fable 5 authored and GitHub committed 2026-09-22 12:22:14 -07:00
1 parent be80e36939
commit 8d02447c36
6 files changed
+10 -16

No files matched your search

@@ -57,14 +57,8 @@ export function PullRequestLabelChip({
return (
<Badge
size={size}
variant="secondary"
className={cn(
"min-w-0 max-w-40 shrink justify-start gap-1 rounded-full px-2",
size === "sm" && "h-4 text-[.625rem]",
color &&
"bg-[color-mix(in_srgb,var(--label)_8%,transparent)] text-[color-mix(in_srgb,var(--label)_30%,var(--color-foreground))] dark:bg-[color-mix(in_srgb,var(--label)_12%,transparent)] dark:text-[color-mix(in_srgb,var(--label)_45%,var(--color-foreground))]",
className,
)}
variant={color ? "label" : "secondary"}
className={cn("min-w-0 max-w-40 shrink justify-start", className)}
{...(color ? { style: { "--label": color } as CSSProperties } : {})}
>
<span className="truncate">{label.name}</span>
@@ -411,7 +405,7 @@ export function PullRequestReviewOutcomeBadge({
}) {
const presentation = REVIEW_OUTCOME_PRESENTATION[outcome];
return (
<Badge size="sm" variant={presentation.badgeVariant} className={cn("gap-1", className)}>
<Badge size="sm" variant={presentation.badgeVariant} className={className}>
<presentation.Icon aria-hidden className="size-3" />
{presentation.label}
</Badge>