import React from 'react';
import ReactDOM from 'react-dom';
import Switch from '..';
import { Button } from '../..';
const Demo = () => {
    const [disabled, setDisabled] = React.useState(true);
    const toggle = () => {
        setDisabled(!disabled);
    };
    return (React.createElement("div", null,
        React.createElement(Switch, { autoWidth: true, disabled: disabled, defaultChecked: true }),
        React.createElement("br", null),
        React.createElement("br", null),
        React.createElement(Button, { type: "primary", onClick: toggle }, "Toggle disabled")));
};
ReactDOM.render(React.createElement(Demo, null), document.getElementById('switch-demo-3'));
