UNPKG

@payfit/unity-components

Version:

22 lines (21 loc) 632 B
import { Label as e } from "../../label/Label.js"; import { useFieldA11yContext as t } from "../TanstackFormField.context.js"; import { forwardRef as n } from "react"; import { jsx as r } from "react/jsx-runtime"; //#region src/components/form-field/parts/TanstackFormLabel.tsx var i = n(({ children: n, isRequired: i, ...a }, o) => { let { requiredVariant: s } = a, c = t(); return /* @__PURE__ */ r(e, { ref: o, htmlFor: c.inputId, id: c.labelId, isRequired: i, requiredVariant: s, className: "uy:leading-[1]!", ...a, children: n }); }); i.displayName = "Label"; //#endregion export { i as TanstackFormLabel };