add some more icons

This commit is contained in:
Milo Schwartz
2024-11-16 12:18:22 -05:00
parent 3c7b2c03f8
commit 587bb758a2
6 changed files with 24 additions and 7 deletions

View File

@@ -1,10 +1,15 @@
"use client";
import { SidebarNav } from "@app/components/sidebar-nav";
import React from "react";
interface SideBarSettingsProps {
children: React.ReactNode;
sidebarNavItems: Array<{ title: string; href: string }>;
sidebarNavItems: Array<{
title: string;
href: string;
icon?: React.ReactNode;
}>;
disabled?: boolean;
limitWidth?: boolean;
}

View File

@@ -17,6 +17,7 @@ interface SidebarNavProps extends React.HTMLAttributes<HTMLElement> {
items: {
href: string;
title: string;
icon?: React.ReactNode;
}[];
disabled?: boolean;
}
@@ -105,7 +106,14 @@ export function SidebarNav({
tabIndex={disabled ? -1 : undefined}
aria-disabled={disabled}
>
{item.title}
{item.icon ? (
<div className="flex items-center space-x-2">
{item.icon}
<span>{item.title}</span>
</div>
) : (
item.title
)}
</Link>
))}
</nav>