New CPM with Laravel 12 and React
This commit is contained in:
14
resources/js/layouts/app/app-header-layout.tsx
Normal file
14
resources/js/layouts/app/app-header-layout.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
import { AppContent } from '@/components/app-content';
|
||||
import { AppHeader } from '@/components/app-header';
|
||||
import { AppShell } from '@/components/app-shell';
|
||||
import { type BreadcrumbItem } from '@/types';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
|
||||
export default function AppHeaderLayout({ children, breadcrumbs }: PropsWithChildren<{ breadcrumbs?: BreadcrumbItem[] }>) {
|
||||
return (
|
||||
<AppShell>
|
||||
<AppHeader breadcrumbs={breadcrumbs} />
|
||||
<AppContent>{children}</AppContent>
|
||||
</AppShell>
|
||||
);
|
||||
}
|
18
resources/js/layouts/app/app-sidebar-layout.tsx
Normal file
18
resources/js/layouts/app/app-sidebar-layout.tsx
Normal file
@ -0,0 +1,18 @@
|
||||
import { AppContent } from '@/components/app-content';
|
||||
import { AppShell } from '@/components/app-shell';
|
||||
import { AppSidebar } from '@/components/app-sidebar';
|
||||
import { AppSidebarHeader } from '@/components/app-sidebar-header';
|
||||
import { type BreadcrumbItem } from '@/types';
|
||||
import { type PropsWithChildren } from 'react';
|
||||
|
||||
export default function AppSidebarLayout({ children, breadcrumbs = [] }: PropsWithChildren<{ breadcrumbs?: BreadcrumbItem[] }>) {
|
||||
return (
|
||||
<AppShell variant="sidebar">
|
||||
<AppSidebar />
|
||||
<AppContent variant="sidebar">
|
||||
<AppSidebarHeader breadcrumbs={breadcrumbs} />
|
||||
{children}
|
||||
</AppContent>
|
||||
</AppShell>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user