@payfit/unity-components
Version:
34 lines (33 loc) • 967 B
JavaScript
import { RawLink as e } from "../../link/RawLink.js";
import { useFormField as t } from "../FormField.context.js";
import { forwardRef as n } from "react";
import { jsx as r } from "react/jsx-runtime";
import { Button as i } from "react-aria-components/Button";
//#region src/components/form-field/parts/RawFormContextualLink.tsx
var a = n((n, a) => {
let { children: o, href: s, onPress: c, ...l } = n, { formContextualLinkId: u } = t();
return s ? /* @__PURE__ */ r(e, {
id: u,
size: "small",
color: "secondary",
variant: "standalone",
"data-unity-slot": "contextual-link",
href: s,
ref: a,
"data-dd-privacy": "allow",
...l,
children: o
}) : /* @__PURE__ */ r(i, {
id: u,
onPress: c,
"data-unity-slot": "contextual-link",
className: "uy:typography-body-small uy:w-fit",
ref: a,
"data-dd-privacy": "allow",
...l,
children: o
});
});
a.displayName = "RawFormContextualLink";
//#endregion
export { a as RawFormContextualLink };