MCPcopy Create free account
hub / github.com/Codehagen/Badget / SelectItem

Function SelectItem

src/components/ui/select.tsx:101–123  ·  view source on GitHub ↗
({
  className,
  children,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Item>)

Source from the content-addressed store, hash-verified

99}
100
101function SelectItem({
102 className,
103 children,
104 ...props
105}: React.ComponentProps<typeof SelectPrimitive.Item>) {
106 return (
107 <SelectPrimitive.Item
108 data-slot="select-item"
109 className={cn(
110 "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
111 className
112 )}
113 {...props}
114 >
115 <span className="absolute right-2 flex size-3.5 items-center justify-center">
116 <SelectPrimitive.ItemIndicator>
117 <CheckIcon className="size-4" />
118 </SelectPrimitive.ItemIndicator>
119 </span>
120 <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
121 </SelectPrimitive.Item>
122 )
123}
124
125function SelectSeparator({
126 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected