UNPKG

@grafana/ui

Version:
15 lines (12 loc) 534 B
import { jsx } from 'react/jsx-runtime'; import { forwardRef } from 'react'; import { Link as Link$1 } from 'react-router-dom-v5-compat'; import { locationUtil, textUtil } from '@grafana/data'; "use strict"; const Link = forwardRef(({ href, children, ...rest }, ref) => { const validUrl = locationUtil.stripBaseFromUrl(textUtil.sanitizeUrl(href != null ? href : "")); return /* @__PURE__ */ jsx(Link$1, { ref, to: validUrl, ...rest, children }); }); Link.displayName = "Link"; export { Link }; //# sourceMappingURL=Link.mjs.map