UNPKG

@dr.pogodin/react-utils

Version:

Collection of generic ReactJS components and utils

10 lines 629 B
/** * The Link wraps around React Router's Link component, to automatically replace * it by the regular <a> element when: * - The target reference points to another domain; * - User opts to open the reference in a new tab; * - User explicitely opts to use <a>. */import{Link as RrLink}from"react-router";import GenericLink from"./GenericLink/index.js";import{jsx as _jsx}from"react/jsx-runtime";const Link=props=>/*#__PURE__*/_jsx(GenericLink// TODO: Avoid the spreading later. // eslint-disable-next-line react/jsx-props-no-spreading ,{...props,routerLinkType:RrLink});export default Link; //# sourceMappingURL=Link.js.map