@@ -279,6 +279,7 @@ const REVIEW_OUTCOME_PRESENTATION = {
279279 ringClassName : "ring-2 ring-emerald-500 dark:ring-emerald-400" ,
280280 staleRingClassName :
281281 "ring-2 ring-[color-mix(in_srgb,var(--color-emerald-500)_35%,var(--background))] dark:ring-[color-mix(in_srgb,var(--color-emerald-400)_35%,var(--background))]" ,
282+ fillClassName : "fill-emerald-500 dark:fill-emerald-400" ,
282283 badgeVariant : "success" ,
283284 } ,
284285 "changes-requested" : {
@@ -287,6 +288,7 @@ const REVIEW_OUTCOME_PRESENTATION = {
287288 toneClassName : "text-destructive" ,
288289 ringClassName : "ring-2 ring-destructive" ,
289290 staleRingClassName : "ring-2 ring-[color-mix(in_srgb,var(--destructive)_35%,var(--background))]" ,
291+ fillClassName : "fill-destructive" ,
290292 badgeVariant : "error" ,
291293 } ,
292294 dismissed : {
@@ -296,6 +298,7 @@ const REVIEW_OUTCOME_PRESENTATION = {
296298 ringClassName : "ring-2 ring-muted-foreground/60" ,
297299 staleRingClassName :
298300 "ring-2 ring-[color-mix(in_srgb,var(--contrast-muted-foreground)_30%,var(--background))]" ,
301+ fillClassName : "fill-muted-foreground" ,
299302 badgeVariant : "outline" ,
300303 } ,
301304} as const satisfies Record <
@@ -306,6 +309,7 @@ const REVIEW_OUTCOME_PRESENTATION = {
306309 toneClassName : string ;
307310 ringClassName : string ;
308311 staleRingClassName : string ;
312+ fillClassName : string ;
309313 badgeVariant : "success" | "error" | "outline" ;
310314 }
311315> ;
@@ -343,6 +347,28 @@ export function PullRequestReviewOutcomeIcon({
343347 ) ;
344348}
345349
350+ // Ring color alone blends into colorful bot avatars; the glyph gives each verdict a shape.
351+ export function PullRequestReviewOutcomeAvatarBadge ( {
352+ outcome,
353+ stale = false ,
354+ } : {
355+ outcome : PullRequestReviewOutcome ;
356+ stale ?: boolean ;
357+ } ) {
358+ const presentation = REVIEW_OUTCOME_PRESENTATION [ outcome ] ;
359+ return (
360+ < presentation . Icon
361+ aria-hidden
362+ strokeWidth = { 3 }
363+ className = { cn (
364+ "absolute -right-1 -bottom-1 size-3 text-background" ,
365+ presentation . fillClassName ,
366+ stale && "opacity-50" ,
367+ ) }
368+ />
369+ ) ;
370+ }
371+
346372export function pullRequestReviewOutcomeLabel ( outcome : PullRequestReviewOutcome ) : string {
347373 return REVIEW_OUTCOME_PRESENTATION [ outcome ] . label ;
348374}
0 commit comments