UNPKG

@theguild/components

Version:
17 lines (16 loc) 467 B
import { jsx } from "react/jsx-runtime"; import { Anchor } from "./anchor"; const NPMBadge = ({ name }) => { const encodedPackage = encodeURIComponent(name); return /* @__PURE__ */ jsx(Anchor, { href: `https://npmjs.com/package/${encodedPackage}`, newWindow: true, children: /* @__PURE__ */ jsx( "img", { src: `https://badge.fury.io/js/${encodedPackage}.svg`, alt: "npm version", className: "h-6" } ) }); }; export { NPMBadge };