This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Sidebar } from './Sidebar';
|
||||
import type { ViewKey } from '../types';
|
||||
|
||||
interface Props {
|
||||
current: ViewKey;
|
||||
onNavigate: (v: ViewKey) => void;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export function AppLayout({ current, onNavigate, children }: Props) {
|
||||
return (
|
||||
<div className="app">
|
||||
<Sidebar current={current} onChange={onNavigate} />
|
||||
<main className="main">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user