@heycar-uikit/core
Version:
The React UI library from HeyCar
23 lines (22 loc) • 730 B
TypeScript
/// <reference types="react" />
import React from 'react';
interface SwitchProps {
/**
* Controls the state of the switch. If true, the switch is displayed as checked
*/
checked: boolean;
/**
* Function that will be called every time the Switch value is changed. The `boolean` property `event.target.checked` represent the new/target value of the Switch.
*/
onChange: () => void;
/**
* Additional `class` names to be added
*/
className?: string;
/**
* Controls if the Switch is disabled
*/
disabled?: boolean;
}
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
export { Switch as default, Switch };