ant-design/components/icon/index.tsx

14 lines
315 B
TypeScript
Raw Normal View History

2016-06-28 22:22:42 +08:00
import * as React from 'react';
2016-06-22 13:18:43 +08:00
export interface IconProps {
type: string;
className?: string;
2016-08-22 17:26:14 +08:00
title?: string;
onClick?: (e) => void;
}
export default (props: IconProps) => {
2016-06-28 22:22:42 +08:00
const { type, className = '' } = props;
2016-07-13 11:14:24 +08:00
return <i {...props} className={`${className} anticon anticon-${type}`.trim()} />;
2016-06-22 13:18:43 +08:00
};