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