1
0
Fork 0

feat(shared): Keep sidebars sticky

This commit is contained in:
joostdecock 2023-11-01 11:08:53 +01:00
parent cdfe2a3059
commit a9f4d5c57a

View file

@ -11,14 +11,16 @@ export const BaseLayout = ({ children = [] }) => (
* The left column of the default layout
*/
export const BaseLayoutLeft = ({ children = [] }) => (
<div className="max-w-96 w-1/4 hidden lg:block shrink-0 my-8">{children}</div>
<div className="max-w-96 w-1/4 hidden lg:block shrink-0 my-8 sticky top-4 max-h-screen overflow-scroll">
{children}
</div>
)
/*
* The right column of the default layout
*/
export const BaseLayoutRight = ({ children = [] }) => (
<div className="max-w-96 w-1/4 hidden xl:block my-8">{children}</div>
<div className="max-w-96 w-1/4 hidden xl:block my-8 sticky top-2">{children}</div>
)
/*