import React from 'react';
import ReactDOM from 'react-dom';
import Tag from '..';
const { Group: TagGroup } = Tag;
const dataType = ['全部', '衣服', '手机', '化妆品'];
class Demo extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            name: '',
        };
        this.onclick = this.onclick.bind(this);
    }
    onclick(v) {
        this.setState({ name: v.item });
    }
    render() {
        return (React.createElement("div", null,
            React.createElement(TagGroup, null, dataType.map(item => (React.createElement(Tag, { type: "normal", key: item, size: "medium", onClick: () => this.onclick({ item }) }, item)))),
            this.state.name));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('tag-demo-7'));
