mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-01 14:59:35 +08:00
424 B
424 B
文字和图标
- order: 2
带有文字和图标。
var Switch = antd.Switch;
var container = document.getElementById('components-switch-demo-text');
React.render(<div>
<Switch checkedChildren="开" unCheckedChildren="关" />
<span> </span>
<Switch checkedChildren={<i className="anticon anticon-check"></i>} unCheckedChildren={<i className="anticon anticon-cross"></i>} />
</div>, container);