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