Skip to content

Commit a6a1726

Browse files
committed
fix(dropdown): improve language menu hover spacing
1 parent 987108a commit a6a1726

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/components/Dropdown/Dropdown.jsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,11 @@ export default function Dropdown({ className = "", items = [] }) {
126126
<div
127127
className={`${
128128
active ? "block" : "hidden"
129-
} absolute top-full right-0 text-[13px] bg-[#526b78] rounded-md shadow-[0_4px_12px_rgba(0,0,0,0.4)] z-[9999]`}
129+
} absolute top-full left-1/2 -translate-x-1/2 overflow-hidden text-[13px] bg-[#526b78] rounded-md shadow-[0_4px_12px_rgba(0,0,0,0.4)] z-[9999]`}
130130
>
131-
<ul className="pt-1">
131+
<ul>
132132
{items.map((item, i) => (
133-
<li
134-
key={item.title}
135-
className="py-1 px-2 list-none text-white transition-all duration-[250ms] hover:bg-[#175d96]"
136-
>
133+
<li key={item.title} className="list-none">
137134
<a
138135
onKeyDown={(event) =>
139136
handleArrowKeys(i, items.length - 1, event)
@@ -142,7 +139,7 @@ export default function Dropdown({ className = "", items = [] }) {
142139
linksRef.current[i] = node;
143140
}}
144141
href={item.url}
145-
className="px-5 block text-white visited:text-white hover:text-white"
142+
className="block min-w-[88px] px-3 py-1 text-center text-white transition-colors duration-[200ms] visited:text-white hover:bg-[#175d96] hover:text-white focus:bg-[#175d96] focus:text-white"
146143
>
147144
<span lang={item.lang} className="align-top text-left">
148145
{item.title}

0 commit comments

Comments
 (0)