@grafana/ui
Version:
Grafana Components Library
20 lines (19 loc) • 942 B
TypeScript
import { HTMLProps } from 'react';
export interface Props extends Omit<HTMLProps<HTMLInputElement>, 'value'> {
value?: boolean;
/** Show an invalid state around the input */
invalid?: boolean;
}
/**
* Switch is a representation of an on-off state – like a light switch. So you can use Switch to toggle binary states.
*
* https://developers.grafana.com/ui/latest/index.html?path=/docs/inputs-switch--docs
*/
export declare const Switch: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
export interface InlineSwitchProps extends Props {
/** Label to show next to the switch */
showLabel?: boolean;
/** Make inline switch's background and border transparent */
transparent?: boolean;
}
export declare const InlineSwitch: import("react").ForwardRefExoticComponent<Omit<InlineSwitchProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;