import React from "react"; import styles from "./index.less"; import { Checkbox, Button } from "antd"; class App extends React.Component { state = { checked: true, disabled: false }; toggleChecked = () => { this.setState({ checked: !this.state.checked }); }; toggleDisable = () => { this.setState({ disabled: !this.state.disabled }); }; onChange = e => { console.log("checked = ", e.target.checked); this.setState({ checked: e.target.checked }); }; render() { const label = `${this.state.checked ? "Checked" : "Unchecked"}-${ this.state.disabled ? "Disabled" : "Enabled" }`; return (

{label}

); } } export default () => (
);