The ThemeToggle component is a button that allows users to switch between light and dark map themes.
Key features:
theme
: a string indicating the current theme ('light'
or 'dark'
).toggleTheme
: a callback function to switch between themes.themeToggle.css
to visually harmonize with other UI controls, including smooth hover effects and rounded corners.Files included:
ThemeToggle.tsx
— component implementation.themeToggle.css
— styling for positioning and visuals.ThemeToggle.test.tsx
— tests for functionality and rendering.