2025-06-07 22:57:28 +08:00

48 lines
1.2 KiB
TypeScript

import { ToastProvider } from '@/modules/toast/Provider';
import Sidebar from './sidebar';
import { Content } from './content';
import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
import { Toolbar } from './modules/Nav';
export const App = () => {
return (
<ToastProvider>
<AIEditor />
</ToastProvider>
);
};
export const SidebarApp = () => {
return (
<ToastProvider>
<Sidebar />
</ToastProvider>
);
};
export const AIEditor = () => {
return (
<div className='flex h-full w-full flex-col items-center '>
<div className='text-xl font-bold text-left w-full bg-secondary p-1 ml-2 flex gap-2 items-center'>
AI Editor
<Toolbar />
</div>
<div style={{ height: 'calc(100vh - 50px)' }} className='flex w-full '>
<div className='flex w-full '>
<PanelGroup direction='horizontal'>
<Panel minSize={20} defaultSize={30}>
<Sidebar />
</Panel>
<PanelResizeHandle />
<Panel minSize={30}>
<div className='w-full h-full overflow-hidden'>
<Content />
</div>
</Panel>
</PanelGroup>
</div>
</div>
</div>
);
};