@uva-glass/component-library
Version:
React components UvA
16 lines (15 loc) • 868 B
TypeScript
import { InputHTMLAttributes } from 'react';
export interface ToggleSwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'style' | 'className'> {
/** The label for the toggle switch. */
label: string;
/** Boolean value if label should be visible. */
labelVisible?: boolean;
/** Selection for label placement compared to toggle switch. */
labelPosition?: 'before' | 'after';
/** Boolean value to be used if the toggle mutates. If true the toggle is disabled in a loading state. */
loading?: boolean;
/** Boolean value if extra gap is needed on left of component. */
extraLeftGap?: boolean;
}
/** Represents a component for a toggle switch. */
export declare function ToggleSwitch({ label, labelPosition, labelVisible, loading, extraLeftGap, ...restProps }: ToggleSwitchProps): import("react/jsx-runtime").JSX.Element;