MCPcopy
hub / github.com/nukeop/nuclear / SelectOption

Function SelectOption

packages/ui/src/components/Select/SelectOption.tsx:13–37  ·  view source on GitHub ↗
({
  id,
  label,
  as = 'li',
  children,
})

Source from the content-addressed store, hash-verified

11};
12
13export const SelectOption: FC<SelectOptionProps> = ({
14 id,
15 label,
16 as = 'li',
17 children,
18}) => {
19 return (
20 <ListboxOption value={id} as={as}>
21 {({ active, selected }) => (
22 <div
23 className={cn(
24 'text-foreground cursor-pointer px-1 py-1',
25 active && 'outline-border outline-2',
26 )}
27 onMouseDown={(e) => e.preventDefault()}
28 >
29 <span className="relative inline-flex w-full flex-row items-center justify-between">
30 {children ?? label}
31 {selected && <span className="flex items-center">✓</span>}
32 </span>
33 </div>
34 )}
35 </ListboxOption>
36 );
37};

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected