mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-25 16:58:00 +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;
|