import { Badge, chakra, HStack } from '@chakra-ui/react'; import { components } from 'react-select'; import type { OptionProps, GroupBase } from 'react-select'; import type { SingleOption } from '~/types'; export const Option = ( props: OptionProps, ): JSX.Element => { const { label, data } = props; const tags = Array.isArray(data.tags) ? (data.tags as string[]) : []; return ( > {...props}> {label} {tags.length > 0 && ( {tags.map(tag => ( {tag} ))} )} ); };