UNPKG

autumn-js

Version:
38 lines (34 loc) 784 B
"use client"; // src/libraries/react/utils/inject-styles.ts var loadingStyles = { width: "100%", height: "100%", display: "flex", justifyContent: "center", alignItems: "center", minHeight: "300px" }; var spinnerStyles = { width: "1.5rem", height: "1.5rem", color: "rgb(161 161 170)", animation: "spin 1s linear infinite" }; if (typeof document !== "undefined") { const styleId = "au-spinner-keyframes"; if (!document.getElementById(styleId)) { const style = document.createElement("style"); style.id = styleId; style.textContent = ` @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } `; document.head.appendChild(style); } } export { loadingStyles, spinnerStyles };