MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / SelectItem

Function SelectItem

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

Source from the content-addressed store, hash-verified

101}
102
103function SelectItem({
104 className,
105 children,
106 ...props
107}: React.ComponentProps<typeof SelectPrimitive.Item>) {
108 return (
109 <SelectPrimitive.Item
110 data-slot="select-item"
111 className={cn(
112 "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",
113 className
114 )}
115 {...props}
116 >
117 <span className="absolute right-2 flex size-3.5 items-center justify-center">
118 <SelectPrimitive.ItemIndicator>
119 <CheckIcon className="size-4" />
120 </SelectPrimitive.ItemIndicator>
121 </span>
122 <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
123 </SelectPrimitive.Item>
124 )
125}
126
127function SelectSeparator({
128 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected