UNPKG

@dr.pogodin/react-utils

Version:

Collection of generic ReactJS components and utils

20 lines (19 loc) 651 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"; 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