@react-md/form
Version:
This package is for creating all the different form input types.
41 lines (40 loc) • 1.25 kB
TypeScript
import type { FocusEventHandler } from "react";
/**
* @internal
* @remarks \@since 2.5.0
*/
interface Options {
active: boolean;
animate: boolean;
animationDuration: number;
discrete: boolean;
disabled: boolean;
onBlur?: FocusEventHandler<HTMLSpanElement>;
onFocus?: FocusEventHandler<HTMLSpanElement>;
}
/**
* @internal
* @remarks \@since 2.5.0
*/
interface ReturnedProps {
/**
* Boolean if the value should animate the `left`, `right`, `top`, and
* `bottom` values to match the speed of the thumb.
*/
animateValue: boolean;
visible: boolean;
onBlur: FocusEventHandler<HTMLSpanElement>;
onFocus: FocusEventHandler<HTMLSpanElement>;
}
/**
* This is a completely internal hook that helps control the visibility of the
* discrete value tooltip's visibility for the `Slider` and `RangeSlider`.
*
* Note: This isn't 100% there since the tooltip doesn't animate in when the
* user holds the mouse down in the same spot for the `animationDuration`.
*
* @internal
* @remarks \@since 2.5.0
*/
export declare function useDiscreteValueVisibility({ active, animate, animationDuration, discrete, disabled, onBlur: propOnBlur, onFocus: propOnFocus, }: Options): ReturnedProps;
export {};