ant-design/components/checkbox/demo/basic.md

21 lines
340 B
Markdown
Raw Normal View History

2015-07-15 15:19:24 +08:00
# 基本用法
- order: 0
简单的 checkbox。
---
````jsx
import { Checkbox } from 'antd';
2015-07-16 13:36:04 +08:00
function onChange(e) {
2015-07-16 12:28:50 +08:00
console.log('checked = ' + e.target.checked);
2015-07-15 15:19:24 +08:00
}
2015-10-20 16:47:55 +08:00
ReactDOM.render(<label>
2015-07-17 11:06:38 +08:00
<Checkbox defaultChecked={false} onChange={onChange} />
Checkbox
2015-12-16 15:25:15 +08:00
</label>, document.getElementById('components-checkbox-demo-basic'));
2015-07-15 15:19:24 +08:00
````