mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 09:21:22 +08:00
20 lines
477 B
TypeScript
20 lines
477 B
TypeScript
|
import React from 'react';
|
||
|
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
|
||
|
import { Switch } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<>
|
||
|
<Switch checkedChildren="开启" unCheckedChildren="关闭" defaultChecked />
|
||
|
<br />
|
||
|
<Switch checkedChildren="1" unCheckedChildren="0" />
|
||
|
<br />
|
||
|
<Switch
|
||
|
checkedChildren={<CheckOutlined />}
|
||
|
unCheckedChildren={<CloseOutlined />}
|
||
|
defaultChecked
|
||
|
/>
|
||
|
</>
|
||
|
);
|
||
|
|
||
|
export default App;
|