diff --git a/src/AntiFlickerScript.jsx b/src/AntiFlickerScript.jsx new file mode 100644 index 0000000..654738a --- /dev/null +++ b/src/AntiFlickerScript.jsx @@ -0,0 +1,6 @@ +import React, { memo } from 'react'; + +export default memo(function AntiFlickerScript({ theme, color }) { + const script = `(function(theme,root){root.classList.remove(\`'${Object.values(color).join("','")}'\`);root.classList.add(theme);root.style.colorScheme=theme;})('${theme}',document.firstElementChild)`; + return