Skip to content

Commit 8bb8bed

Browse files
authored
fix(web): pull request state badge matches the redesign's status chips (#29182)
1 parent 79ba6db commit 8bb8bed

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

‎apps/web/src/components/pullRequest/PullRequestDetailCrumbs.tsx‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { MouseEvent as ReactMouseEvent, ReactNode } from "react";
55
import { resolvePullRequestState } from "./pullRequestPresentation";
66
import { cn } from "~/lib/utils";
77
import { readLocalApi } from "~/localApi";
8+
import { Badge } from "../ui/badge";
89
import { Button, InlineButton } from "../ui/button";
910
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
1011
import { openOnHostLabel, showPullRequestLinkContextMenu } from "./pullRequestLinkContextMenu";
@@ -148,19 +149,19 @@ export function PullRequestDetailCrumbs({
148149
focusable
149150
/>
150151
{detail.state !== "open" || detail.isDraft ? (
151-
<span
152-
className={cn(
153-
"inline-flex h-5 shrink-0 items-center gap-1 rounded-md border px-1.75 text-caption",
152+
<Badge
153+
size="status"
154+
variant={
154155
detail.state === "merged"
155-
? "border-merged-foreground/25 bg-merged-tint text-merged-foreground"
156+
? "merged"
156157
: detail.state === "closed"
157-
? "border-error-foreground/25 bg-error-tint text-error-foreground"
158-
: "border-border bg-badge-neutral text-muted-foreground",
159-
)}
158+
? "error"
159+
: "secondary"
160+
}
160161
>
161-
<state.Icon aria-hidden className="size-[11px]" />
162+
<state.Icon aria-hidden />
162163
{state.label}
163-
</span>
164+
</Badge>
164165
) : null}
165166
{children}
166167
</>

0 commit comments

Comments
 (0)