UNPKG

@harvest-profit/npk

Version:
20 lines 1.29 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); const Spinner_module_css_1 = __importDefault(require("./Spinner.module.css")); const sizeMap = { sm: 16, md: 32, lg: 64, }; const Spinner = ({ size: sizeKey = 'md', ...props }) => { const size = sizeMap[sizeKey]; return ( /* inline-flex removes the extra line height */ (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsxs)("svg", { className: Spinner_module_css_1.default.Spinner, height: size, width: size, viewBox: "0 0 16 16", fill: "none", "aria-busy": "true", "aria-hidden": "true", "aria-label": "Loading...", ...props, children: [(0, jsx_runtime_1.jsx)("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeOpacity: "0.25", strokeWidth: "2", vectorEffect: "non-scaling-stroke" }), (0, jsx_runtime_1.jsx)("path", { d: "M15 8a7.002 7.002 0 00-7-7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", vectorEffect: "non-scaling-stroke" })] }) })); }; exports.default = Spinner; //# sourceMappingURL=Spinner.js.map