mirror of
https://github.com/vercel/commerce.git
synced 2025-06-18 13:11:23 +00:00
Update I18nWidget.tsx
This commit is contained in:
parent
c5a9ce0125
commit
1f1bf9206f
@ -51,7 +51,7 @@ const I18nWidget: FC = () => {
|
|||||||
/>
|
/>
|
||||||
{LOCALES_MAP[currentLocale].name}
|
{LOCALES_MAP[currentLocale].name}
|
||||||
{options && (
|
{options && (
|
||||||
<span style={{transform:"translateY(0.15rem)"}} className="cursor-pointer">
|
<span style={{transform:"translateY(0.1rem)"}} className="cursor-pointer">
|
||||||
<svg
|
<svg
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
width="24"
|
width="24"
|
||||||
@ -72,7 +72,7 @@ const I18nWidget: FC = () => {
|
|||||||
<div className="absolute top-0 right-0">
|
<div className="absolute top-0 right-0">
|
||||||
{options?.length && display ? (
|
{options?.length && display ? (
|
||||||
<div className={s.dropdownMenu}>
|
<div className={s.dropdownMenu}>
|
||||||
<div className="flex flex-row justify-end px-4 pt-4">
|
<div className="flex flex-row justify-end px-2 pt-2">
|
||||||
<button
|
<button
|
||||||
onClick={() => setDisplay(false)}
|
onClick={() => setDisplay(false)}
|
||||||
aria-label="Close panel"
|
aria-label="Close panel"
|
||||||
@ -86,6 +86,11 @@ const I18nWidget: FC = () => {
|
|||||||
<li key={locale}>
|
<li key={locale}>
|
||||||
<Link href={currentPath} locale={locale}>
|
<Link href={currentPath} locale={locale}>
|
||||||
<a className={cn(s.item)} onClick={() => setDisplay(false)}>
|
<a className={cn(s.item)} onClick={() => setDisplay(false)}>
|
||||||
|
<img
|
||||||
|
className="block mr-2 w-5"
|
||||||
|
src={`/${LOCALES_MAP[currentLocale].img.filename}`}
|
||||||
|
alt={LOCALES_MAP[currentLocale].img.alt}
|
||||||
|
/>
|
||||||
{LOCALES_MAP[locale].name}
|
{LOCALES_MAP[locale].name}
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user