diff --git a/app/components/ui/page-breadcrumb.tsx b/app/components/ui/page-breadcrumb.tsx new file mode 100644 index 0000000..02fb328 --- /dev/null +++ b/app/components/ui/page-breadcrumb.tsx @@ -0,0 +1,30 @@ +import { Fragment } from 'react'; +import { Link } from 'react-router'; +import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from '~/components/ui/breadcrumb'; + +interface PageBreadcrumbProps { + trail: { label: string; to: string }[]; + current: string; +} + +export function PageBreadcrumb({ trail, current }: PageBreadcrumbProps) { + return ( + + + {trail.map((crumb) => ( + + + + {crumb.label} + + + / + + ))} + + {current} + + + + ); +}