MCPcopy
hub / github.com/intentui/intentui / ComboBoxContent

Function ComboBoxContent

src/components/ui/combo-box.tsx:45–75  ·  view source on GitHub ↗
({
  children,
  items,
  className,
  popover,
  ...props
}: ComboBoxListProps<T>)

Source from the content-addressed store, hash-verified

43}
44
45const ComboBoxContent = <T extends object>({
46 children,
47 items,
48 className,
49 popover,
50 ...props
51}: ComboBoxListProps<T>) => {
52 return (
53 <PopoverContent
54 placement={popover?.placement ?? 'bottom'}
55 className={cx(
56 'min-w-(--trigger-width) overflow-hidden *:data-[slot=popover-inner]:overflow-hidden',
57 popover?.className
58 )}
59 {...popover}
60 >
61 <ListBox
62 layout="stack"
63 orientation="vertical"
64 className={cx(
65 "grid max-h-[inherit] w-full grid-cols-[auto_1fr] flex-col gap-y-1 overflow-y-auto p-1 outline-hidden *:[[role='group']+[role=group]]:mt-4 *:[[role='group']+[role=separator]]:mt-1",
66 className
67 )}
68 items={items}
69 {...props}
70 >
71 {children}
72 </ListBox>
73 </PopoverContent>
74 )
75}
76
77const ComboBoxInput = (props: InputProps) => {
78 const context = useSlottedContext(ComboBoxContext)!

Callers

nothing calls this directly

Calls 1

cxFunction · 0.90

Tested by

no test coverage detected