/* eslint-disable react/jsx-props-no-spreading */
import { createFromIconfontCN } from "@ant-design/icons";
import { IconFontProps } from "@ant-design/icons/lib/components/IconFont";
import classNames from "classnames";

const MyIcon = createFromIconfontCN({
  scriptUrl: "//at.alicdn.com/t/c/font_4061730_xy9ys77j0xs.js",
});
interface FontIconProps extends IconFontProps<string> {
  size?: number;
  color?: string;
  type: string;
}
export default function FontIcon(props: FontIconProps) {
  const { type, style, size, color, className, ...rest } = props;
  return (
    <MyIcon {...rest} className={classNames("font_icon", className)} style={{ color: color || "#fff", fontSize: size || 30, ...style }} type={type} />
  );
}
