2019-08-01 07:50:25 +00:00
|
|
|
# ToggleButton
|
|
|
|
|
|
|
|
#### Description
|
|
|
|
|
|
|
|
Custom toggle button input
|
|
|
|
|
|
|
|
#### Usage
|
|
|
|
|
|
|
|
```js
|
|
|
|
import { ToggleButton } from 'asc-web-components';
|
|
|
|
|
|
|
|
<ToggleButton value="text" onChange={event => alert(event.target.value)}/>
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Properties
|
|
|
|
|
|
|
|
| Props | Type | Required | Values | Default | Description |
|
|
|
|
| ---------------------- | -------- | :------: | ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------ |
|
2019-08-01 10:50:16 +00:00
|
|
|
| `label` | `string` | - | - | - | Label of the input
|
2019-08-01 07:50:25 +00:00
|
|
|
| `isChecked` | `bool` | - | - | - | The checked property sets the checked state of a ToggleButton.
|
|
|
|
| `isDisabled` | `bool` | - | - | - | Disables the ToggleButton
|
|
|
|
| `onChange` | `func` | ✅ | - | - | Will be triggered whenever an ToggleButton is clicked
|