import classnames from 'classnames' ; import { BaseComponentProps } from '@models/BaseProps' ; interface IconProps extends BaseComponentProps { type : string ; size ? : number ; onClick ? : React . FormEventHandler ; } export function Icon ( props ) { const { type , size = 14 , className : cn , style : s } = props ; const className = classnames ( 'clash-iconfont' , `icon-${ type }` , cn ) ; const style = { fontSize : size , ... s } ; const iconProps = { ... props , className , style } ; return < i { ... iconProps } / > ; }