fumadocs-core
Version:
The React.js library for building a documentation website
29 lines (26 loc) • 649 B
JavaScript
'use client';
import { Link as Link$1 } from "./framework/index.js";
import { forwardRef } from "react";
import { jsx } from "react/jsx-runtime";
//#region src/link.tsx
const Link = forwardRef(({ href = "#", external = href.match(/^\w+:/) || href.startsWith("//"), prefetch, children, ...props }, ref) => {
if (external) return /* @__PURE__ */ jsx("a", {
ref,
href,
rel: "noreferrer noopener",
target: "_blank",
...props,
children
});
return /* @__PURE__ */ jsx(Link$1, {
ref,
href,
prefetch,
...props,
children
});
});
Link.displayName = "Link";
//#endregion
export { Link as default };
//# sourceMappingURL=link.js.map