@react-md/form
Version:
This package is for creating all the different form input types.
26 lines (25 loc) • 979 B
TypeScript
import type { CSSProperties } from "react";
import type { SwitchProps } from "./Switch";
export interface AsyncSwitchProps extends SwitchProps {
/**
* Boolean if the switch is still loading. This will "disable" the switch and
* add the circular progress indicator in the switch's ball until it is set
* back to false.
*/
loading: boolean;
/**
* An optional style to apply to the progress bar while the loading state is
* enabled.
*/
progressStyle?: CSSProperties;
/**
* An optional class name to apply to the progress bar while the loading state
* is enabled.
*/
progressClassName?: string;
}
/**
* This component will create an async switch that will show a loading indicator
* and prevent the switch from being toggled while the loading state is true.
*/
export declare const AsyncSwitch: import("react").ForwardRefExoticComponent<AsyncSwitchProps & import("react").RefAttributes<HTMLInputElement>>;