CheckableTag.js 495 Bytes
import template from "./CheckableTag.html";
import style from "antd/lib/tag/style/index.css";

class CheckableTag {
    
    useModules = ["esNgAntd"];

    constructor() {
        esNgAntd.createStyle("ant-tag", style);
    }

    handleClick() {
        this.props.onChange({
            checked: !(this.props.checked === true),
        });
    }

    render() {
        return template;
    }
}

CheckableTag.propTypes = {
    checked: PropTypes.boolean,
    onChange: PropTypes.function,
};