Skip to content

Commit

Permalink
Set body color from query param
Browse files Browse the repository at this point in the history
  • Loading branch information
rossta committed Dec 23, 2024
1 parent 367c765 commit e30608c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ function App() {
? parseFloat(queryParams.get('animationSpeed')!)
: undefined;

const body = document.querySelector('body');
if (body) {
body.classList.add(isDarkMode ? 'dark' : 'light');
body.style.backgroundColor = customColors.background || '';
}

return (
<div className='min-h-screen flex items-center justify-center p-4'>
<EnumerationDemo
Expand Down

0 comments on commit e30608c

Please sign in to comment.