import { useState } from 'react' import { FzfHighlight, useFzf, type UseFzfResults } from 'react-fzf' import Select, { components, type GroupBase, type OptionProps } from 'react-select' import { colors } from '../utils/data' import { Example } from '../utils/Example' const colorOptions = colors.map((color) => ({ label: capitalize(color), value: color })) export function Option(props: OptionProps) { return ( ) } export function WithValues() { const [query, setQuery] = useState('') const { getFzfHighlightProps, results } = useFzf({ items: colorOptions, itemToString(item) { return item.value }, query, }) return (
    {colorOptions.map(({ value }) => (
  • {value}
  • ))}