diff --git a/src/components/Breadcrumbs/Breadcrumbs.tsx b/src/components/Breadcrumbs/Breadcrumbs.tsx index 8c078234fd..96fdd8bc50 100644 --- a/src/components/Breadcrumbs/Breadcrumbs.tsx +++ b/src/components/Breadcrumbs/Breadcrumbs.tsx @@ -24,12 +24,12 @@ type BaseBreadcrumbsItem = { title?: string; }; -type LinkBreadcrumbsItem = { +export type LinkBreadcrumbsItem = { href: string; action?: (event: React.MouseEvent | KeyboardEvent) => void; } & BaseBreadcrumbsItem; -type ButtonBreadcrumbsItem = { +export type ButtonBreadcrumbsItem = { href?: undefined; action: (event: React.MouseEvent | KeyboardEvent) => void; } & BaseBreadcrumbsItem; diff --git a/src/components/Breadcrumbs/BreadcrumbsButton.tsx b/src/components/Breadcrumbs/BreadcrumbsButton.tsx index 0f3670958e..8cd51ee818 100644 --- a/src/components/Breadcrumbs/BreadcrumbsButton.tsx +++ b/src/components/Breadcrumbs/BreadcrumbsButton.tsx @@ -6,7 +6,7 @@ const b = block('breadcrumbs'); export function BreadcrumbsButton(props: { title: string; - onClick: React.MouseEventHandler; + onClick?: React.MouseEventHandler; children: React.ReactNode; }) { return