spinners-react
Version:
Lightweight SVG/CSS spinners for React
39 lines (31 loc) • 1.03 kB
JavaScript
import { a as __assign } from './withSharedProps-KvHSGnzu.js';
var defaultProps = {
speed: 100,
still: false,
thickness: 100,
};
var secondaryColorDefaultProps = __assign(__assign({}, defaultProps), { secondaryColor: 'rgba(0,0,0,0.44)' });
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));
}
}
export { secondaryColorDefaultProps as a, defaultProps as d, styleInject as s };
//# sourceMappingURL=style-inject.es-CuJ1gXUq.js.map