UNPKG

phoenix-components-library

Version:

Component library for Phoenix Frontend Projects.

38 lines (28 loc) 854 B
# Switch ### Usage ```js import { Switch } from 'phoenix-components-library'; render() { return ( <Switch defaultChecked handleChangeCheckbox={this.someFunction()} disabled /> ); } ``` ### Live Example <!-- STORY --> ### Properties - `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 | - | | ### Roadmap