fix: restore active tab indicator in scrollable SiteNav
Move overflow-x-auto to the outer border-b container and use min-w-max on the nav so the framer-motion layoutId indicator is not clipped.
This commit is contained in:
@@ -35,8 +35,8 @@ export default function SiteNav({ siteId }: SiteNavProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="border-b border-neutral-200 dark:border-neutral-800 mb-6">
|
<div className="border-b border-neutral-200 dark:border-neutral-800 mb-6 overflow-x-auto scrollbar-hide">
|
||||||
<nav className="flex gap-1 overflow-x-auto scrollbar-hide" role="tablist" aria-label="Site navigation" onKeyDown={handleTabKeyDown}>
|
<nav className="flex gap-1 min-w-max" role="tablist" aria-label="Site navigation" onKeyDown={handleTabKeyDown}>
|
||||||
{tabs.map((tab) => (
|
{tabs.map((tab) => (
|
||||||
<Link
|
<Link
|
||||||
key={tab.href}
|
key={tab.href}
|
||||||
|
|||||||
Reference in New Issue
Block a user