phoenix-components-library
Version:
Component library for Phoenix Frontend Projects.
38 lines (28 loc) • 854 B
Markdown
```js
import { Switch } from 'phoenix-components-library';
render() {
return (
<Switch
defaultChecked
handleChangeCheckbox={this.someFunction()}
disabled
/>
);
}
```
<!-- STORY -->
- `defaultChecked` - to set Switch to checked
- `small` - To show small version of Switch
- `disabled` - To disable Switch
- `handleChangeCheckbox` - Switch click callback function
| propName | propType | defaultValue | isRequired |
| -------------------- | -------- | ------------ | ---------- |
| defaultChecked | bool | false | |
| small | bool | false | |
| disabled | bool | false | |
| handleChangeCheckbox | func | - | |