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';
|
2016-03-30 17:41:17 +08:00
|
|
|
|
|
|
|
export default class IconSet extends React.Component {
|
|
|
|
static defaultProps = {
|
2016-05-11 09:32:33 +08:00
|
|
|
icons: [],
|
2016-03-30 17:41:17 +08:00
|
|
|
}
|
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 (
|
2016-04-29 12:13:27 +08:00
|
|
|
<ul className={listClassName}>
|
2016-03-07 11:58:14 +08:00
|
|
|
{this.props.icons.map((type, i) => <CopyableIcon key={i} type={type} />)}
|
|
|
|
</ul>
|
|
|
|
);
|
|
|
|
}
|
2016-03-30 17:41:17 +08:00
|
|
|
}
|