refactor: nav to sticky
This commit is contained in:
parent
bfc04e9033
commit
26718ef33c
@ -25,7 +25,7 @@ export const Layout: React.FC = React.memo(() => {
|
|||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full">
|
<div className="flex flex-col h-full">
|
||||||
{showHeader && (
|
{showHeader && (
|
||||||
<div className="flex items-center bg-gray-100 px-4">
|
<div className="flex items-center bg-gray-100 px-4 sticky top-0 z-20">
|
||||||
<div className="px-2 mr-10 font-bold">Tianji</div>
|
<div className="px-2 mr-10 font-bold">Tianji</div>
|
||||||
<div className="flex gap-8">
|
<div className="flex gap-8">
|
||||||
<NavItem to="/dashboard" label="Dashboard" />
|
<NavItem to="/dashboard" label="Dashboard" />
|
||||||
@ -63,7 +63,7 @@ export const Layout: React.FC = React.memo(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="flex-1 w-full px-4 overflow-auto">
|
<div className="flex-1 w-full px-4">
|
||||||
<div className="max-w-7xl m-auto h-full">
|
<div className="max-w-7xl m-auto h-full">
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user