import React from 'react'; import { components } from 'react-select'; import { OptionProps } from 'react-select/lib/components/Option'; // https://github.com/JedWatson/react-select/issues/3038 interface ExtendedOptionProps extends OptionProps { data: any; } export const PickerOption = (props: ExtendedOptionProps) => { const { children, data, className } = props; return (
{data.avatarUrl && {data.label}} {children}
); }; export default PickerOption;