import { MoreHorizontal } from 'lucide-react' import Link from 'next/link' import { Button, cn, DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from 'ui' type Props = { label: string icon: React.ReactNode dropdownItems?: React.ReactNode href: string isActive: boolean onClick?: (e: any) => void } export function LogsSidebarItem({ label, icon, dropdownItems, href, isActive, onClick }: Props) { return (
{icon} {label} {dropdownItems && ( { // Prevents clicking the dropdown from also clicking the parent link and navigating to it e.preventDefault() }} > {dropdownItems} )}
) }