ui/ToggleIcon
An unstyled icon component that handles interaction and toggles state between activated and deactivated.
Visually, it may be to be customized by a theme or application to represent any state.
Members
Section titled “Members ”ToggleIcon Component
Section titled “ToggleIcon   Component ”Represents a Boolean state, and can accept any icon to toggle.
Extends:
ui/ToggleIconui/ToggleIcon.ToggleIconBase
Wrapped with:
ui/ToggleIconui/ToggleIcon.ToggleIconDecorator
Properties
onToggle
Section titled “onToggle”The handler to run when the component is toggled.
ToggleIconBase Component
Section titled “ToggleIconBase   Component ”Represents a Boolean state, and can accept any icon to toggle.
Properties
The icon to use for this component.
Called with a reference to the root component.
When using ui/ToggleIconui/ToggleIcon.ToggleIcon, the ref prop is forwarded to this component
as componentRef.
Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
toggleIcon- The root class nameicon- The background node of the buttonselected- Applied to aselectedbutton
disabled
Section titled “disabled”Disables ToggleIcon.
iconClasses
Section titled “iconClasses”CSS classes to be used on the Icon component
The component used to render the icon.
Default: 'div'selected
Section titled “selected”Sets whether this control is in the 'on' or 'off' state. true for 'on', false for 'off'.
ToggleIconDecorator Component
Section titled “ToggleIconDecorator   Component ”Adds support for the onToggle prop callback to be fired when the onTap (touch-safe onClick)
event executes.
Wrapped with:
ui/ForwardRefui/ForwardRef.ForwardRef
Wrapped with:
ui/Toggleableui/Toggleable.Toggleable
Wrapped with:
ui/Touchableui/Touchable.Touchable