ant-design/components/checkbox/demo/basic.md
2022-05-23 14:37:16 +08:00

463 B

order title
0
zh-CN en-US
基本用法 Basic

zh-CN

简单的 checkbox。

en-US

Basic usage of checkbox.

import { Checkbox } from 'antd';
import type { CheckboxChangeEvent } from 'antd/es/checkbox';
import React from 'react';

const onChange = (e: CheckboxChangeEvent) => {
  console.log(`checked = ${e.target.checked}`);
};

const App: React.FC = () => <Checkbox onChange={onChange}>Checkbox</Checkbox>;

export default App;