react-fatless-form
Version:
A lightweight React form package designed for simplicity that simplifies form handling and validation without unnecessary complexity or bloat.
9 lines (8 loc) • 351 B
TypeScript
/**
* Custom hook to calculate label width and dynamically set
* styles for masking the parent's border behind the label.
*
* @param label - The label text.
* @returns [labelRef, dynamicStyles]
*/
export declare function useLabelStyle(label: string): readonly [import("react").RefObject<HTMLLabelElement | null>, import("react").CSSProperties];