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

21 lines
292 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) {
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
</label>, mountNode);
2015-07-15 15:19:24 +08:00
````