ui/ Toggle Icon
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.
import ToggleIcon from '@enact/ui/ToggleIcon';
Members
ToggleIconComponent
Represents a Boolean state, and can accept any icon to toggle.
import ToggleIcon from '@enact/ui/ToggleIcon';
Properties
The handler to run when the component is toggled.
ToggleIconBaseComponent
Represents a Boolean state, and can accept any icon to toggle.
import {ToggleIconBase} from '@enact/ui/ToggleIcon';
Properties
The icon to use for this component.
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 aselected
button
Disables
ToggleIcon
.Default: falseCSS classes to be used on the Icon component
The component used to render the icon.
Default: 'div'Sets whether this control is in the 'on' or 'off' state.
true
for 'on',false
for 'off'.Default: false
ToggleIconDecoratorComponent
Adds support for the onToggle
prop callback to be fired when the onTap
(touch-safe onClick
)
event executes.
import {ToggleIconDecorator} from '@enact/ui/ToggleIcon';