ant-design/site/theme/template/IconSet/index.jsx

24 lines
553 B
React
Raw Normal View History

2016-03-07 11:58:14 +08:00
import React from 'react';
import classNames from 'classnames';
2016-03-31 17:46:35 +08:00
import CopyableIcon from './CopyableIcon';
export default class IconSet extends React.Component {
static defaultProps = {
2016-05-11 09:32:33 +08:00
icons: [],
}
2016-03-07 11:58:14 +08:00
render() {
const className = this.props.className;
const listClassName = classNames({
'anticons-list': true,
clearfix: true,
[className]: !!className,
});
return (
<ul className={listClassName}>
2016-03-07 11:58:14 +08:00
{this.props.icons.map((type, i) => <CopyableIcon key={i} type={type} />)}
</ul>
);
}
}