DocSpace-client/web/ASC.Web.Components/src/components/checkbox/README.md

36 lines
1.5 KiB
Markdown
Raw Normal View History

2019-06-25 15:49:12 +00:00
# Checkbox
2019-06-26 13:25:35 +00:00
Custom checkbox input
2019-06-25 15:49:12 +00:00
### Usage
2019-06-25 15:49:12 +00:00
```js
import { Checkbox } from "asc-web-components";
```
2019-06-25 15:49:12 +00:00
```jsx
<Checkbox
id="id"
name="name"
value="value"
label="label"
isChecked={false}
isIndeterminate={false}
isDisabled={false}
onChange={() => {}}
/>
2019-06-25 15:49:12 +00:00
```
### Properties
2019-06-25 15:49:12 +00:00
| Props | Type | Required | Values | Default | Description |
| ----------------- | :------: | :------: | :----: | :-----: | ----------------------------------------------------------- |
| `id` | `string` | - | - | - | Used as HTML `id` property |
| `name` | `string` | - | - | - | Used as HTML `name` property |
| `value` | `string` | - | - | - | Value of the input |
| `label` | `string` | - | - | - | Label of the input |
| `isChecked` | `bool` | - | - | `false` | The checked property sets the checked state of a checkbox |
| `isIndeterminate` | `bool` | - | - | - | If true, this state is shown as a rectangle in the checkbox |
| `isDisabled` | `bool` | - | - | - | Disables the Checkbox input |
| `onChange` | `func` | ✅ | - | - | Will be triggered whenever an CheckboxInput is clicked |