21 lines
1.1 KiB
Markdown
21 lines
1.1 KiB
Markdown
|
# 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 |
|
||
|
| ---------------------- | -------- | :------: | ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------ |
|
||
|
| `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
|