mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-18 13:34:06 +01:00
29 lines
1010 B
TypeScript
29 lines
1010 B
TypeScript
import { NavigationMenuLink } from "@/components/ui/navigation-menu";
|
|
import { cn } from "@/lib/utils";
|
|
import React from "react";
|
|
const ListItem = React.forwardRef<React.ElementRef<"a">, React.ComponentPropsWithoutRef<"a">>(
|
|
({ className, title, children, ...props }, ref) => {
|
|
return (
|
|
<li>
|
|
<NavigationMenuLink asChild>
|
|
<a
|
|
ref={ref}
|
|
className={cn(
|
|
"block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
<div className="text-sm font-medium leading-none">{title}</div>
|
|
<hr />
|
|
<p className="line-clamp-2 text-sm leading-snug text-muted-foreground">{children}</p>
|
|
</a>
|
|
</NavigationMenuLink>
|
|
</li>
|
|
);
|
|
}
|
|
);
|
|
ListItem.displayName = "ListItem";
|
|
|
|
export default ListItem;
|