mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 08:59:15 +08:00
11 lines
239 B
TypeScript
11 lines
239 B
TypeScript
|
import React from 'react';
|
||
|
import { Switch } from 'antd';
|
||
|
|
||
|
const onChange = (checked: boolean) => {
|
||
|
console.log(`switch to ${checked}`);
|
||
|
};
|
||
|
|
||
|
const App: React.FC = () => <Switch defaultChecked onChange={onChange} />;
|
||
|
|
||
|
export default App;
|