import React, { FC, HTMLAttributes, ReactNode } from 'react';
import { Icon16Done } from '@vkontakte/icons';
import { classNames } from '../../lib/classNames';
import { hasReactNode } from '../../lib/utils';
import Text from '../Typography/Text/Text';
import { HasRootRef } from 'types';
export interface CustomSelectOptionProps extends HTMLAttributes, HasRootRef {
option?: any;
selected?: boolean;
focused?: boolean;
hovered?: boolean;
before?: ReactNode;
after?: ReactNode;
}
const CustomSelectOption: FC = ({
children,
hovered,
selected,
before,
after,
className,
...restProps
}: CustomSelectOptionProps) => {
const title = typeof children === 'string' ? children : null;
return (
{hasReactNode(before) && {before}
}
{children}
{hasReactNode(after) && {after}
}
{selected && (
)}
);
};
export default CustomSelectOption;