main
tsx 22 lines 572 Bytes
Raw
1 import { ReactNode } from "react";
2 import BottomNav from "./BottomNav";
3 import Toolbar from "./Toolbar";
4
5 interface LayoutProps {
6 children: ReactNode;
7 title: string;
8 showBack?: boolean;
9 rightAction?: React.ReactNode;
10 }
11
12 const Layout = ({ children, title, showBack, rightAction }: LayoutProps) => {
13 return (
14 <div className="min-h-screen bg-background pb-16">
15 <Toolbar title={title} showBack={showBack} rightAction={rightAction} />
16 <main className="max-w-lg mx-auto">{children}</main>
17 <BottomNav />
18 </div>
19 );
20 };
21
22 export default Layout;