fix: browser console warning: Skipping auto-scroll behavior due to position: sticky or position: fixed on element

This commit is contained in:
Alessio Gravili
2024-03-15 17:02:41 -04:00
parent 04a3223ff5
commit b329e3c43c

View File

@@ -30,8 +30,9 @@ export const DefaultTemplate: React.FC<Props> = async ({
} = {},
} = config || {}
// #nav-toggler needs to be wrapped in a div, not Fragment. This fixes https://github.com/shadcn-ui/ui/issues/1355#issuecomment-1909192594
return (
<Fragment>
<div>
<div className={`${baseClass}__nav-toggler-wrapper`} id="nav-toggler">
<NavToggler className={`${baseClass}__nav-toggler`}>
<NavHamburger />
@@ -53,6 +54,6 @@ export const DefaultTemplate: React.FC<Props> = async ({
{children}
</div>
</Wrapper>
</Fragment>
</div>
)
}