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

Function ComboboxChip

components/ui/combobox.tsx:252–285  ·  view source on GitHub ↗
({
  className,
  children,
  showRemove = true,
  ...props
}: ComboboxPrimitive.Chip.Props & {
  showRemove?: boolean;
})

Source from the content-addressed store, hash-verified

250}
251
252function ComboboxChip({
253 className,
254 children,
255 showRemove = true,
256 ...props
257}: ComboboxPrimitive.Chip.Props & {
258 showRemove?: boolean;
259}) {
260 return (
261 <ComboboxPrimitive.Chip
262 data-slot="combobox-chip"
263 className={cn(
264 "bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-none px-1.5 text-xs font-medium whitespace-nowrap has-data-[slot=combobox-chip-remove]:pr-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50",
265 className
266 )}
267 {...props}
268 >
269 {children}
270 {showRemove && (
271 <ComboboxPrimitive.ChipRemove
272 render={<Button variant="ghost" size="icon-xs" />}
273 className="-ml-1 opacity-50 hover:opacity-100"
274 data-slot="combobox-chip-remove"
275 >
276 <HugeiconsIcon
277 icon={Cancel01Icon}
278 strokeWidth={2}
279 className="pointer-events-none"
280 />
281 </ComboboxPrimitive.ChipRemove>
282 )}
283 </ComboboxPrimitive.Chip>
284 );
285}
286
287function ComboboxChipsInput({
288 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected