import { useCombobox } from 'downshift' import { useState } from 'react' import { FzfHighlight, useFzf } from 'react-fzf' import { colors } from '../utils/data' import { Example } from '../utils/Example' export function WithStrings() { const [query, setQuery] = useState('') const { getFzfHighlightProps, results } = useFzf({ items: colors, query }) const { getInputProps, getItemProps, getLabelProps, getMenuProps, getToggleButtonProps, highlightedIndex, isOpen, selectedItem, } = useCombobox({ items: results, onInputValueChange: ({ inputValue }) => { setQuery(inputValue ?? '') }, }) return ( ) }