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

27 lines
343 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
order: 0
2016-08-18 11:22:55 +08:00
title:
zh-CN: 基本用法
en-US: Basic
2016-03-31 09:40:55 +08:00
---
2015-07-15 15:19:24 +08:00
2016-08-18 11:22:55 +08:00
## zh-CN
2015-07-15 15:19:24 +08:00
简单的 checkbox。
2016-08-18 11:22:55 +08:00
## en-US
Basic usage of checkbox.
2017-01-19 15:19:03 +08:00
````__react
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 onChange={onChange}>Checkbox</Checkbox>
2016-02-17 18:02:33 +08:00
, mountNode);
2015-07-15 15:19:24 +08:00
````