DashboardLayout komponentinin kullanımı ve özellikleri
| Prop | Tip | Zorunlu | Açıklama |
|---|---|---|---|
| brandData | BrandData | ✅ | Logo ve marka bilgileri |
| userData | UserData | ✅ | Kullanıcı bilgileri |
| navGroups | NavGroup[] | ✅ | Menü yapısı |
| showFooter | boolean | ❌ | Footer göster/gizle |
| footerData | AppFooterProps | ❌ | Footer içeriği |
| children | ReactNode | ✅ | Sayfa içeriği |
import { DashboardLayout } from '@hascanb/arf-ui-kit/layout-kit'
import { Home, Package, Users } from 'lucide-react'
export default function Layout({ children }) {
return (
<DashboardLayout
brandData={{
title: "My App",
subtitle: "v1.0",
url: "/",
icon: Home,
}}
userData={{
name: "John Doe",
email: "john@example.com",
avatar: "/avatar.jpg",
role: "Admin",
}}
navGroups={[
{
label: "Menü",
items: [
{
title: "Ana Sayfa",
url: "/",
icon: Home,
},
{
title: "Ürünler",
icon: Package,
badge: "12",
items: [
{ title: "Tüm Ürünler", url: "/products" },
{ title: "Yeni Ürün", url: "/products/new" },
],
},
],
},
]}
showFooter={true}
>
{children}
</DashboardLayout>
)
}import {
testNavGroups, // Test & geliştirme menüsü
cargoNavGroups, // Kargo sistemi örneği
ecommerceNavGroups, // E-ticaret örneği
basicNavGroups, // Basit menü
} from '@hascanb/arf-ui-kit/layout-kit'
<DashboardLayout
brandData={...}
userData={...}
navGroups={testNavGroups} // Hazır menü kullan
/>interface BrandData {
title: string
subtitle?: string
url: string
icon: LucideIcon
}
interface UserData {
name: string
email: string
avatar?: string
role?: string
}
interface NavGroup {
label?: string
items: NavItem[]
}
interface NavItem {
title: string
url?: string
icon: LucideIcon
badge?: string
items?: NavSubItem[]
}
interface NavSubItem {
title: string
url: string
}Sidebar'daki menü, header'daki breadcrumb ve bu sayfa artık DashboardLayout komponenti kullanılarak render ediliyor.