UNPKG

@shopify/shop-minis-react

Version:

React component library for Shopify Shop Minis with Tailwind CSS v4 support (source-only, requires TypeScript)

28 lines (27 loc) 992 B
import { jsx as l } from "react/jsx-runtime"; import { forwardRef as p } from "react"; import { useHref as c } from "../../shop-minis-react/node_modules/.pnpm/react-router@7.7.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-router/dist/development/chunk-EF7DTUVF.js"; import { useNavigateWithTransition as d } from "../../hooks/navigation/useNavigateWithTransition.js"; const u = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, R = p(({ onClick: i, to: t, children: o, ...a }, n) => { const s = d(), r = typeof t == "string" && u.test(t); r && console.warn( "TransitionLink: absolute URLs are not supported. Please update to a valid relative path." ); const f = c(t); return /* @__PURE__ */ l( "a", { ...a, onClick: (e) => { i && i(e), e.defaultPrevented || (e.preventDefault(), s(t)); }, href: r ? void 0 : f, ref: n, children: o } ); }); export { R as TransitionLink }; //# sourceMappingURL=transition-link.js.map