import React from 'react'; import classNames from 'classnames'; import omit from 'omit.js'; export interface IconProps { type: string; className?: string; title?: string; onClick?: React.MouseEventHandler; spin?: boolean; style?: React.CSSProperties; } const Icon = (props: IconProps) => { const { type, className = '', spin } = props; const classString = classNames({ anticon: true, 'anticon-spin': !!spin || type === 'loading', [`anticon-${type}`]: true, }, className); return ; }; export default Icon;