Skip to content

Commit e30608c

Browse files
committed
Set body color from query param
1 parent 367c765 commit e30608c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/App.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ function App() {
2828
? parseFloat(queryParams.get('animationSpeed')!)
2929
: undefined;
3030

31+
const body = document.querySelector('body');
32+
if (body) {
33+
body.classList.add(isDarkMode ? 'dark' : 'light');
34+
body.style.backgroundColor = customColors.background || '';
35+
}
36+
3137
return (
3238
<div className='min-h-screen flex items-center justify-center p-4'>
3339
<EnumerationDemo

0 commit comments

Comments
 (0)