UNPKG

@payfit/unity-components

Version:

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