// Type definitions for ui/ToggleIcon import * as React from "react"; import { ForwardRefProps as ui_ForwardRef_ForwardRefProps } from "@enact/ui/ForwardRef"; import { ToggleableProps as ui_Toggleable_ToggleableProps } from "@enact/ui/Toggleable"; import { TouchableProps as ui_Touchable_TouchableProps } from "@enact/ui/Touchable"; type Omit = Pick>; type Merge = Omit> & N; export interface ToggleIconBaseProps { /** * The icon to use for this component. */ children?: string | object; /** * Called with a reference to the root component. * * When using , the `ref` prop is forwarded to this component as `componentRef` . */ componentRef?: object | Function; /** * 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 name * * `icon` - The background node of the button * * `selected` - Applied to a `selected` button */ css?: object; /** * Disables `ToggleIcon` . */ disabled?: boolean; /** * CSS classes to be used on the Icon component */ iconClasses?: string; /** * The component used to render the icon. */ iconComponent?: string | React.ComponentType; /** * Sets whether this control is in the 'on' or 'off' state. `true` for 'on', `false` for 'off'. */ selected?: boolean; } /** * Represents a Boolean state, and can accept any icon to toggle. */ export class ToggleIconBase extends React.Component< Merge, ToggleIconBaseProps> > {} export interface ToggleIconDecoratorProps extends Merge< Merge, ui_Touchable_TouchableProps > {} /** * Adds support for the `onToggle` prop callback to be fired when the `onTap` (touch-safe `onClick` ) event executes. */ export class ToggleIconDecorator extends React.Component< Merge, ToggleIconDecoratorProps> > {} export interface ToggleIconProps extends Omit< Merge, "componentRef" > { /** * The handler to run when the component is toggled. */ onToggle?: Function; } /** * Represents a Boolean state, and can accept any icon to toggle. */ export class ToggleIcon extends React.Component< Merge, ToggleIconProps> > {} export default ToggleIcon;