UNPKG

@lifespikes/ui

Version:
28 lines (27 loc) 1.58 kB
import { Button, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem } from '@lifespikes/ui/components/ui'; import { LucideProps } from 'lucide-react'; import { ComponentPropsWithoutRef, HTMLAttributes } from 'react'; import { PopoverContentProps, PopoverProps, PopoverTriggerProps } from '@radix-ui/react-popover'; type ComboboxOption = { label: string; value: string; }; export type ComboboxOptions = ComboboxOption[]; export type SimpleComboboxProps = PopoverProps & { options: ComboboxOptions; value?: string; onSelect?: (value: string) => void; _popOverTriggerProps?: PopoverTriggerProps; _buttonProps?: ComponentPropsWithoutRef<typeof Button>; _popOverContentProps?: PopoverContentProps; _commandProps?: ComponentPropsWithoutRef<typeof Command>; _commandInputProps?: ComponentPropsWithoutRef<typeof CommandInput>; _commandEmptyProps?: ComponentPropsWithoutRef<typeof CommandEmpty>; _commandGroupProps?: ComponentPropsWithoutRef<typeof CommandGroup>; _commandItemProps?: ComponentPropsWithoutRef<typeof CommandItem>; _checkIconProps?: LucideProps; _upDownIconProps?: LucideProps; _containerProps?: HTMLAttributes<HTMLDivElement>; }; declare const SimpleCombobox: ({ onSelect, options, value, _popOverTriggerProps, _buttonProps, _popOverContentProps, _commandProps, _commandInputProps, _commandEmptyProps, _commandGroupProps, _commandItemProps, _checkIconProps, _upDownIconProps, _containerProps, ...props }: SimpleComboboxProps) => import("react/jsx-runtime").JSX.Element; export { SimpleCombobox };