@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
22 lines (18 loc) • 746 B
JavaScript
"use client";
import { createComponent } from "../../core/components/create-component.js";
import { linkStyle } from "./link.style.js";
//#region src/components/link/link.tsx
const { PropsContext: LinkPropsContext, usePropsContext: useLinkPropsContext, withContext } = createComponent("link", linkStyle);
/**
* `Link` is a component for creating hyperlinks to different web pages, locations within the same page, or other URLs.
*
* @see https://yamada-ui.com/docs/components/link
*/
const Link = withContext("a")(void 0, ({ external,...rest }) => ({
rel: external ? "noopener" : void 0,
target: external ? "_blank" : void 0,
...rest
}));
//#endregion
export { Link, LinkPropsContext, useLinkPropsContext };
//# sourceMappingURL=link.js.map