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:
@@ -3,7 +3,7 @@
|
||||
}
|
||||
|
||||
.button {
|
||||
@apply h-10 px-2 rounded-md border border-accent-2 flex items-center justify-center transition-colors ease-linear;
|
||||
@apply h-10 pl-2 pr-1 rounded-md border border-accent-2 flex items-center justify-center transition-colors ease-linear;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
@@ -32,7 +32,7 @@
|
||||
}
|
||||
|
||||
.icon.active {
|
||||
transform: rotate(180deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
@screen lg {
|
||||
|
@@ -3,7 +3,7 @@ import Link from 'next/link'
|
||||
import { FC, useState } from 'react'
|
||||
import { useRouter } from 'next/router'
|
||||
import s from './I18nWidget.module.css'
|
||||
import { Cross, ChevronUp } from '@components/icons'
|
||||
import { Cross, ChevronRight } from '@components/icons'
|
||||
import ClickOutside from '@lib/click-outside'
|
||||
import Image from 'next/image'
|
||||
interface LOCALE_DATA {
|
||||
@@ -54,14 +54,14 @@ const I18nWidget: FC = () => {
|
||||
<Image
|
||||
width="20"
|
||||
height="20"
|
||||
className="block mr-2 w-5"
|
||||
className="block w-5"
|
||||
src={`/${LOCALES_MAP[currentLocale].img.filename}`}
|
||||
alt={LOCALES_MAP[currentLocale].img.alt}
|
||||
unoptimized
|
||||
/>
|
||||
{options && (
|
||||
<span className="cursor-pointer">
|
||||
<ChevronUp className={cn(s.icon, { [s.active]: display })} />
|
||||
<span className="cursor-pointer ml-1">
|
||||
<ChevronRight className={cn(s.icon, { [s.active]: display })} />
|
||||
</span>
|
||||
)}
|
||||
</button>
|
||||
|
Reference in New Issue
Block a user