Skip to content

Instantly share code, notes, and snippets.

@jorgeadev
Last active June 25, 2025 22:08
Show Gist options
  • Select an option

  • Save jorgeadev/a38549e48a579ef3409307e922467987 to your computer and use it in GitHub Desktop.

Select an option

Save jorgeadev/a38549e48a579ef3409307e922467987 to your computer and use it in GitHub Desktop.
import { IBreadcrumbItem } from "@/types";
import { ReactNode } from "react";
import Link from "next/link";
export const BreadcrumbItem = ({ children, href, isRoot, isCurrent }: IBreadcrumbItem)
:
ReactNode => {
return (
<>
{ !isRoot && (<span className="opacity-50" aria-hidden="true">/</span>) }
<li>
<Link
href={ href }
aria-current={ isCurrent ? "page" : undefined }
className={
`transition duration-200 hover:opacity-80 capitalize
${ isCurrent ? "bg-gradient-to-br from-[#9ebd13] to-[#008552] bg-clip-text font-bold text-transparent" : "text-gray-300" }`
}
>
{ children }
</Link>
</li>
</>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment