UNPKG

@nish1896/rhf-mui-components

Version:

A suite of 20+ production-ready react-hook-form components built with material-ui. Fully typed, tree-shakable, and optimized for enterprise-grade forms.

14 lines (13 loc) 332 B
import { fieldNameToId } from "./text-transform.js"; //#region src/utils/useFieldIds.ts function useFieldIds(fieldName) { const fieldId = fieldNameToId(fieldName); return { fieldId, labelId: `${fieldId}-label`, helperTextId: `${fieldId}-helper-text`, errorId: `${fieldId}-error` }; } //#endregion export { useFieldIds };