import { Select as AntdSelect } from "antd";
import { SelectProps } from "antd/lib/select";
import { ReactComponent as DownIcon } from "icons/down.svg";
import React, { ReactNode } from "react";
import "./Select.scss";

interface IProps extends SelectProps<any> {
  children: ReactNode;
}

const { Option } = AntdSelect;

const Select = ({ children, ...props }: IProps) => {
  return (
    <AntdSelect {...props} suffixIcon={<DownIcon />}>
      {children}
    </AntdSelect>
  );
};

export { Option, Select };
