The props attribute, enableSystem, and disableTransitionOnChange are accepted but not applied. Either implement their handling (e.g., toggling classes or system theme detection) or remove them to keep the API surface clean.
const root = document.documentElement;
// Handle disableTransitionOnChange
if (disableTransitionOnChange) {
root.classList.add('disable-transition');
setTimeout(() => {
root.classList.remove('disable-transition');
}, 0);
}
// Handle enableSystem
if (enableSystem) {
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
root.classList.remove('dark', 'light');
root.classList.add(systemTheme);
} else {
// Set default theme
root.classList.remove('dark', 'light');
root.classList.add(defaultTheme);
}
}, [defaultTheme, enableSystem, disableTransitionOnChange]);
Originally posted by @Copilot in omoladeodetara#1 (comment)