Initial commit

This commit is contained in:
2024-04-17 22:54:13 +02:00
commit a8fdb455f4
162 changed files with 49158 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
export const createAnimation = (loaderName, frames, suffix) => {
const animationName = `react-spinners-${loaderName}-${suffix}`;
if (typeof window == "undefined" || !window.document) {
return animationName;
}
const styleEl = document.createElement("style");
document.head.appendChild(styleEl);
const styleSheet = styleEl.sheet;
const keyFrames = `
@keyframes ${animationName} {
${frames}
}
`;
if (styleSheet) {
styleSheet.insertRule(keyFrames, 0);
}
return animationName;
};