primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue) [ • 2.45 kB
JavaScript
import { openBlock, createElementBlock, normalizeStyle, createElementVNode } from 'vue';
var script = {
name: 'ProgressSpinner',
props: {
strokeWidth: {
type: String,
default: '2'
},
fill: {
type: String,
default: 'none'
},
animationDuration: {
type: String,
default: '2s'
}
},
computed: {
svgStyle() {
return {
'animation-duration': this.animationDuration
};
}
}
};
const _hoisted_1 = {
class: "p-progress-spinner",
role: "progressbar"
};
const _hoisted_2 = ["fill", "stroke-width"];
function render(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createElementBlock("div", _hoisted_1, [
(openBlock(), createElementBlock("svg", {
class: "p-progress-spinner-svg",
viewBox: "25 25 50 50",
style: normalizeStyle($options.svgStyle)
}, [
createElementVNode("circle", {
class: "p-progress-spinner-circle",
cx: "50",
cy: "50",
r: "20",
fill: $props.fill,
"stroke-width": $props.strokeWidth,
strokeMiterlimit: "10"
}, null, 8, _hoisted_2)
], 4))
]))
}
function styleInject(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;
if (!css || typeof document === 'undefined') { return; }
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (insertAt === 'top') {
if (head.firstChild) {
head.insertBefore(style, head.firstChild);
} else {
head.appendChild(style);
}
} else {
head.appendChild(style);
}
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
}
var css_248z = "\n.p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n}\n.p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n}\n.p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n}\n";
styleInject(css_248z);
script.render = render;
export { script as default };