import 'blue/lib/icon/index.scss';
import Icon from 'blue/lib/icon';
import 'blue/lib/feedback/index.scss';
import Feedback from 'blue/lib/feedback';
import CopyToClipboard from 'react-copy-to-clipboard';
const types = [
'all', 'cart', 'comments', 'cry', 'email',
'favorite', 'folder', 'form', 'help', 'refresh',
'set', 'training', 'account', 'atm', 'clock',
'attachment', '3column', '4column', 'discount', 'service',
'print', 'box', 'process', 'bags', 'electronics',
'gifts', 'lights', 'auto', 'browse', 'atm-away',
'scanning', 'compare', 'filter', 'pin', 'history',
'similar-product', 'link', 'cut', 'table', 'nav-list',
'image-text', 'text', 'move', 'subtract', 'dollar',
'office', 'operation', 'download', 'map', 'bad',
'good', 'skip', 'play', 'stop', 'compass',
'security', 'share', 'store', 'phone', 'ellipsis',
'email-filling', 'favorites-filling', 'account-filling', 'credit-level', 'credit-level-filling',
'mobile-phone', 'smile', 'personal-center', 'arrow-up-filling', 'arrow-right',
'arrow-left', 'arrow-down', 'arrow-up', 'add', 'minus',
'delete-filling', 'edit', 'error', 'select', 'ashbin',
'calendar', 'time', 'success', 'warning', 'search',
'display', 'category', 'prompt', 'arrow-down-filling', 'sorting',
'ascending', 'descending', 'success-filling', 'picture', 'close', 'semi-select',
'tag-subscript', 'survey', 'loading', 'arrow-double-left', 'arrow-double-right'
];
const handleCopy = () => Feedback.toast.success('Copied!');
ReactDOM.render(
<div>
<h2>点击复制剪贴板</h2>
<ul className="icon-list">
{types.map((type, index) => (
<CopyToClipboard key={index} text={`<Icon type="${type}" />`} onCopy={handleCopy}>
<li>
<Icon type={type} size="xl" />
<span>{type}</span>
</li>
</CopyToClipboard>))}
</ul>
</div>
, mountNode);