warungpos-ui / src /layouts /AdminLayout.jsx
Mhamdans17
fix: tightly lock AdminLayout to prevent body scroll bouncing
f3c5fbf
Raw
History Blame Contribute Delete
715 Bytes
import { Outlet } from 'react-router-dom';
import Navbar from '../components/Navbar';
import Sidebar from '../components/Sidebar';
export default function AdminLayout() {
return (
<div style={{ position: 'fixed', inset: 0, background: '#f0f5f8', overflow: 'hidden' }}>
<Sidebar />
<main className="admin-main" style={{ marginLeft: '256px', height: '100dvh', display: 'flex', flexDirection: 'column', minWidth: 0, overflowX: 'hidden', overflowY: 'auto', transition: 'margin-left 0.2s ease', WebkitOverflowScrolling: 'touch' }}>
<Navbar />
<div className="admin-content" style={{ padding: '28px 32px', flex: 1 }}>
<Outlet />
</div>
</main>
</div>
);
}