MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / SelectItem

Function SelectItem

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

Source from the content-addressed store, hash-verified

98}
99
100function SelectItem({
101 className,
102 children,
103 ...props
104}: React.ComponentProps<typeof SelectPrimitive.Item>) {
105 return (
106 <SelectPrimitive.Item
107 data-slot="select-item"
108 className={cn(
109 "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 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
110 className,
111 )}
112 {...props}
113 >
114 <span
115 data-slot="select-item-indicator"
116 className="absolute right-2 flex size-3.5 items-center justify-center"
117 >
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