ant-design/components/switch/demo/text.tsx
MadCcc fab90b09f4
docs: fix site issue (#38552)
* docs: put an example loading component

* fix: site issue

* fix: site issue

* feat: add loading

* feat: alert

* docs: rm ReactDOM.render in md

* docs: use style tag

* chore: update snapshot

* Revert "docs: use style tag"

This reverts commit 1f75a99f8c972dc72f05391b472641245f6d8a17.

* docs: update demo

* chore: update demo

Co-authored-by: PeachScript <scdzwyxst@gmail.com>
2022-11-15 22:55:01 +08:00

18 lines
493 B
TypeScript

import React from 'react';
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
import { Switch, Space } from 'antd';
const App: React.FC = () => (
<Space direction="vertical">
<Switch checkedChildren="开启" unCheckedChildren="关闭" defaultChecked />
<Switch checkedChildren="1" unCheckedChildren="0" />
<Switch
checkedChildren={<CheckOutlined />}
unCheckedChildren={<CloseOutlined />}
defaultChecked
/>
</Space>
);
export default App;