@pdf-viewer/react
Version:
A react-pdf-viewer component for React and Next.js. Suitable for react-pdf document.
30 lines (29 loc) • 643 B
JavaScript
import { jsx as c } from "react/jsx-runtime";
const s = {
"rp-skip-link": "_rp-skip-link_15qjp_1"
}, l = ({ href: n, label: i }) => {
const o = (r) => {
r.preventDefault();
const e = document.querySelector(n);
if (!e)
return;
const t = e.querySelector(
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
) || e;
t && typeof t.focus == "function" && t.focus();
};
return /* @__PURE__ */ c(
"a",
{
href: n,
className: s["rp-skip-link"],
onClick: o,
"aria-label": i,
tabIndex: 0,
children: i
}
);
};
export {
l as SkipLink
};