UNPKG

ratio-lock

Version:

A TypeScript library for managing n numbers with locked ratios. When the ratio is locked, changing one value automatically adjusts all other values to maintain their proportional relationships.

8 lines 506 B
import type { ChangeEvent } from 'react'; import type { FieldValues, Path, UseFormSetValue } from 'react-hook-form'; import type { RatioLock } from '../ratio-lock.js'; /** * Creates an onChange handler for a specific field index */ export declare function createFieldChangeHandler<T extends FieldValues>(index: number, ratioLock: RatioLock, names: readonly Path<T>[], setFormValue: UseFormSetValue<T>): (e: ChangeEvent<HTMLInputElement>) => void; //# sourceMappingURL=create-field-change-handler.d.ts.map