mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-12 20:43:11 +08:00
chore: 迁移 switch iconfont
This commit is contained in:
parent
335c34aab7
commit
37a1e03bc8
@ -8,11 +8,12 @@
|
|||||||
|
|
||||||
````jsx
|
````jsx
|
||||||
var Switch = antd.Switch;
|
var Switch = antd.Switch;
|
||||||
|
var Icon = antd.Icon;
|
||||||
var container = document.getElementById('components-switch-demo-text');
|
var container = document.getElementById('components-switch-demo-text');
|
||||||
|
|
||||||
React.render(<div>
|
React.render(<div>
|
||||||
<Switch checkedChildren="开" unCheckedChildren="关" />
|
<Switch checkedChildren="开" unCheckedChildren="关" />
|
||||||
<span> </span>
|
<span> </span>
|
||||||
<Switch checkedChildren={<i className="anticon anticon-check"></i>} unCheckedChildren={<i className="anticon anticon-cross"></i>} />
|
<Switch checkedChildren={<Icon type="check" />} unCheckedChildren={<Icon type="cross" />} />
|
||||||
</div>, container);
|
</div>, container);
|
||||||
````
|
````
|
||||||
|
Loading…
Reference in New Issue
Block a user