react-fatless-form
Version:
A lightweight React form package designed for simplicity that simplifies form handling and validation without unnecessary complexity or bloat.
10 lines (9 loc) • 510 B
TypeScript
/**
* Custom hook to calculate label width and dynamically set
* styles for masking the parent's border behind the label,
* with support for theme switching via `data-theme`.
*
* @param label - The label text (for triggering recomputation when changed).
* @returns [labelRef, dynamicStyles] - Ref to attach to <label>, and inline CSS vars for styling.
*/
export declare function useLabelStyle(label: string): readonly [import("react").RefObject<HTMLLabelElement | null>, import("react").CSSProperties];