mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Footer theme switcher (#894)
* Footer theme switcher * Remove lazy loading & change rotation animation * Changes * Update ThemeSwitcher.tsx * Requested style changes * Update ThemeSwitcher.tsx * Fix alignment * Update ThemeSwitcher.tsx
This commit is contained in:
22
site/components/ui/ThemeSwitcher/ThemeIcon.tsx
Normal file
22
site/components/ui/ThemeSwitcher/ThemeIcon.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Moon, Sun, System } from '@components/icons'
|
||||
|
||||
interface ThemeIconProps {
|
||||
theme?: string
|
||||
width: number
|
||||
height: number
|
||||
}
|
||||
|
||||
const ThemeIcon = ({ theme, ...props }: ThemeIconProps) => {
|
||||
switch (theme) {
|
||||
case 'light':
|
||||
return <Sun {...props} />
|
||||
|
||||
case 'dark':
|
||||
return <Moon {...props} />
|
||||
|
||||
default:
|
||||
return <System {...props} />
|
||||
}
|
||||
}
|
||||
|
||||
export default ThemeIcon
|
Reference in New Issue
Block a user