MCPcopy Create free account
hub / github.com/TheOrcDev/github-creature / SelectItem

Function SelectItem

components/ui/select.tsx:123–153  ·  view source on GitHub ↗
({
  className,
  children,
  ...props
}: SelectPrimitive.Item.Props)

Source from the content-addressed store, hash-verified

121}
122
123function SelectItem({
124 className,
125 children,
126 ...props
127}: SelectPrimitive.Item.Props) {
128 return (
129 <SelectPrimitive.Item
130 data-slot="select-item"
131 className={cn(
132 "focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
133 className
134 )}
135 {...props}
136 >
137 <SelectPrimitive.ItemText className="flex flex-1 gap-2 shrink-0 whitespace-nowrap">
138 {children}
139 </SelectPrimitive.ItemText>
140 <SelectPrimitive.ItemIndicator
141 render={
142 <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
143 }
144 >
145 <HugeiconsIcon
146 icon={Tick02Icon}
147 strokeWidth={2}
148 className="pointer-events-none"
149 />
150 </SelectPrimitive.ItemIndicator>
151 </SelectPrimitive.Item>
152 );
153}
154
155function SelectSeparator({
156 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected