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

20 lines
283 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
}
2016-02-17 18:02:33 +08:00
ReactDOM.render(
<Checkbox defaultChecked={false} onChange={onChange}>Checkbox</Checkbox>
, mountNode);
2015-07-15 15:19:24 +08:00
````