UNPKG

jsx-readme

Version:

Generate Readme files with a React-like syntax and package.json-aware helpers.

18 lines 852 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.NpmBundleSizeBadge = void 0; /* @jsx MD */ const jsx_md_1 = __importDefault(require("jsx-md")); const Badge_1 = require("../Badge"); /** Display a badge with the most recent version of this package on npm. */ const NpmBundleSizeBadge = ({ pkg }) => { if (pkg.private !== undefined && pkg.private) { return null; } return ((0, jsx_md_1.default)(Badge_1.Badge, { link: `https://bundlephobia.com/result?p=${pkg.name}`, imageSource: `https://img.shields.io/bundlephobia/minzip/${pkg.name}.svg` }, "bundle size")); }; exports.NpmBundleSizeBadge = NpmBundleSizeBadge; //# sourceMappingURL=NpmBundleSizeBadge.js.map