import React from 'react'; import { components } from '@torkelo/react-select'; import { OptionProps } from 'react-select/lib/components/Option'; // https://github.com/JedWatson/react-select/issues/3038 interface ExtendedOptionProps extends OptionProps { data: { description?: string; imgUrl?: string; }; } export const Option = (props: ExtendedOptionProps) => { const { children, isSelected, data } = props; return (
{data.imgUrl && }
{children}
{data.description &&
{data.description}
}
{isSelected &&