import './icon.scss'
import * as React from "react";
import 'icons/car.svg'
import 'icons/loading.svg'
import 'icons/close.svg'
import sc from 'utils/classname'

interface IconProps extends React.SVGAttributes<SVGElement> {
  name: string;
}

const Icon: React.FunctionComponent<IconProps> = (props) => {
  const {className, name, ...restProps} = props;
  return (
    <svg className={sc('wen-design-svg', className)} {...restProps} >
      <use xlinkHref={`#${name}`}/>
    </svg>
  );
};

export default Icon