@hakit/components
Version:
A series of components to work with @hakit/core
25 lines • 1.38 kB
TypeScript
export interface ControlToggleProps extends Omit<React.ComponentPropsWithoutRef<"div">, "checked" | "onChange"> {
/** should the switch be disabled */
disabled?: boolean;
/** should the switch be vertical or horizontal @default true */
vertical?: boolean;
/** should you reverse the order of the switch by default @default false */
reversed?: boolean;
/** If the switch is checked */
checked?: boolean;
/** the thickness of the switch @default 40 */
thickness?: number;
/** the icon to use when the switch is on @default mdi:power */
onIcon?: string;
/** the icon to use when the switch is off @default mdi:power-off */
offIcon?: string;
/** called when the switch is toggled */
onChange?: (checked: boolean) => void;
/** switch color as a css value, rgb, rgba, hex etc.. */
color?: string;
}
/** A simple control switch similar to home assistant switches, used in the popup for switch entities, you can reverse the order, change orientation, all you need to set is your desired width/height depending on the orientation
* Note: If you want to use this directly with an element to call the toggle service, you can use the SwitchControls component.
*/
export declare function ControlToggle(props: ControlToggleProps): import("@emotion/react/jsx-runtime").JSX.Element;
//# sourceMappingURL=index.d.ts.map