Browse Source

fix icon.tsx

pull/2216/head
afc163 9 years ago
parent
commit
9bf8c81ec8
  1. 10
      components/icon/index.tsx

10
components/icon/index.tsx

@ -1,10 +1,6 @@
import React from 'react';
import splitObject from '../_util/splitObject';
import * as React from 'react';
export default props => {
const [{type, className = ''}, others] = splitObject(props,
['type','className']);
let className2 = `${className} anticon anticon-${type}`.trim();
return <i className={className2} {...others} />;
const { type, className = '' } = props;
return <i {...props} className={`${className} anticon anticon-${type}`.trim()} />
};

Loading…
Cancel
Save