import React from 'react';
import ReactDOM from 'react-dom';
import Switch from '..';
import { Icon } from '../..';
function onChange(checked) {
    console.log(`switch to ${checked}`);
}
ReactDOM.render(React.createElement("div", null,
    React.createElement(Switch, { autoWidth: true, checkedChildren: "on", unCheckedChildren: "off", onChange: onChange }),
    React.createElement("br", null),
    React.createElement(Switch, { autoWidth: true, checkedChildren: "\u5DF2\u542F\u7528", unCheckedChildren: "\u5DF2\u5173\u95ED", onChange: onChange }),
    React.createElement("br", null),
    React.createElement(Switch, { autoWidth: true, checkedChildren: React.createElement(Icon, { type: "select", size: "xs" }), unCheckedChildren: React.createElement(Icon, { type: "close", size: "xs" }), onChange: onChange })), document.getElementById('switch-demo-4'));
