File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import type {
88 SourceControlProviderKind ,
99} from "@t3tools/contracts" ;
1010import {
11- CheckIcon ,
1211 CircleCheckIcon ,
1312 CircleDashedIcon ,
1413 CircleSlashIcon ,
@@ -38,6 +37,7 @@ import {
3837 MenuPopup ,
3938 MenuRadioGroup ,
4039 MenuRadioItem ,
40+ MenuRadioItemIndicator ,
4141 MenuSeparator ,
4242 MenuSub ,
4343 MenuSubPopup ,
@@ -206,7 +206,7 @@ function PullRequestFilterRadioGroup<Value extends string>({
206206 < PullRequestFilterOptionIcon option = { option } />
207207 < span className = "min-w-0 flex-1 truncate" > { option . label } </ span >
208208 { option . unavailable ? < span className = "shrink-0" > · Unavailable</ span > : null }
209- { option . value === value ? < CheckIcon aria-hidden className = "size-3.5" /> : null }
209+ < MenuRadioItemIndicator />
210210 </ span >
211211 </ MenuRadioItem >
212212 ) ;
Original file line number Diff line number Diff line change 11"use client" ;
22
33import { Menu as MenuPrimitive } from "@base-ui/react/menu" ;
4- import { ChevronRightIcon } from "lucide-react" ;
4+ import { CheckIcon , ChevronRightIcon } from "lucide-react" ;
55import type * as React from "react" ;
66
77import { cn } from "~/lib/utils" ;
@@ -177,6 +177,23 @@ function MenuRadioItem({
177177 ) ;
178178}
179179
180+ function MenuRadioItemIndicator ( {
181+ className,
182+ children,
183+ ...props
184+ } : MenuPrimitive . RadioItemIndicator . Props ) {
185+ return (
186+ < MenuPrimitive . RadioItemIndicator
187+ aria-hidden
188+ className = { cn ( "flex shrink-0" , className ) }
189+ data-slot = "menu-radio-item-indicator"
190+ { ...props }
191+ >
192+ { children ?? < CheckIcon className = "size-3.5" /> }
193+ </ MenuPrimitive . RadioItemIndicator >
194+ ) ;
195+ }
196+
180197function MenuGroupLabel ( {
181198 className,
182199 inset,
@@ -300,6 +317,7 @@ export {
300317 MenuRadioGroup as DropdownMenuRadioGroup ,
301318 MenuRadioItem ,
302319 MenuRadioItem as DropdownMenuRadioItem ,
320+ MenuRadioItemIndicator ,
303321 MenuGroupLabel ,
304322 MenuGroupLabel as DropdownMenuLabel ,
305323 MenuSeparator ,
You can’t perform that action at this time.
0 commit comments