import { Select, SelectProps, Space } from 'antd';
import { MyIcons } from '../MyIcons';

export function MyIconSelect(props: SelectProps) {
  return (
    <Select allowClear {...props}>
      {Object?.entries(MyIcons).map(([key, Icon]) => {
        return (
          <Select.Option value={key} label={key} key={key}>
            <Space>
              {Icon}
              {key}
            </Space>
          </Select.Option>
        );
      })}
    </Select>
  );
}
