Files
bookshelf/books/components/Layout.tsx
Yuriy Panov 3004f712f3 initial
2026-02-02 17:12:25 +06:00

26 lines
782 B
TypeScript

import React from 'react';
import { AppScreen } from '../types';
import { BottomNav } from './BottomNav';
interface LayoutProps {
children: React.ReactNode;
currentScreen: AppScreen;
setScreen: (screen: AppScreen) => void;
hideNav?: boolean;
}
export const Layout: React.FC<LayoutProps> = ({ children, currentScreen, setScreen, hideNav }) => {
return (
<div className="relative flex flex-col min-h-screen w-full overflow-x-hidden max-w-md mx-auto shadow-2xl bg-background-light dark:bg-background-dark border-x border-gray-200 dark:border-border-dark/30">
<main className="flex-1 flex flex-col">
{children}
</main>
{!hideNav && (
<BottomNav currentScreen={currentScreen} setScreen={setScreen} />
)}
</div>
);
};