MaterialR IconToggle
@materialr/icon-toggle
React Material icon-toggle implementation.
Installation
$ npm install --save @materialr/icon-toggle
Demo
A full demo is available on the MaterialR website showcasing all variants.
Components
Default export
import IconToggle from '@materialr/icon-toggle';
Props
Prop | Type | Required | Default | Description |
---|---|---|---|---|
className |
string | No | undefined | Additional classNames to add |
disabled |
bool | No | false | Whether the icon-toggle is disabled |
iconOff |
string | Yes | N/A | The material icon to render for the off state |
iconOn |
string | Yes | N/A | The material icon to render for the on state |
labelOff |
string | Yes | N/A | The title to add to the icon-toggle in the off state |
labelOn |
string | Yes | N/A | The title to add to the icon-toggle in the on state |
onChange |
func | Yes | N/A | The change handler method |