import { clsx } from 'clsx'; import { forwardRef } from 'react'; import { TypeaheadOption } from '../Typeahead'; import Highlight from '../util/highlight'; export type TypeaheadOptionProps = { option: TypeaheadOption; selected?: boolean; onClick?: React.MouseEventHandler; query?: string; id?: string; }; const Option = forwardRef>((props, ref) => { const { option, selected = false, onClick = () => {}, query = '', id } = props; const { label, note, secondary } = option; return (
  • {note && {note}} {secondary && ( )}
  • ); }); export default Option;