Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions types/react-router-breadcrumbs-hoc/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export interface Options {
export interface BreadcrumbsRoute {
path: string;
breadcrumb: React.ReactNode | string;
matchOptions?: {
exact?: boolean;
sensitive?: boolean;
strict?: boolean;
}
}

export interface BreadcrumbsProps<T = {}> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ const UserBreadcrumb = ({ match }: UserBreadcrumbProps) => (

const routes: BreadcrumbsRoute[] = [
{ path: "/users/:userId", breadcrumb: UserBreadcrumb },
{ path: "/example", breadcrumb: "Custom Example" }
{ path: "/example", breadcrumb: "Custom Example" },
{
path: "/example/config",
breadcrumb: "Custom Example with Config",
matchOptions: {
exact: true,
sensitive: false,
strict: false,
}
}
];

const Breadcrumbs = ({ breadcrumbs }: InjectedProps) => (
Expand Down