Skip to content

Commit

Permalink
fix(Breadcrumbs): renamed LinkBreadcrumbsItem and `ButtonBreadcrumb…
Browse files Browse the repository at this point in the history
…sItem` types (#1437)
  • Loading branch information
smsochneg authored Mar 21, 2024
1 parent e5fde1b commit db09f93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Breadcrumbs/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ type BaseBreadcrumbsItem = {
title?: string;
};

export type LinkBreadcrumbsItem = {
export type BreadcrumbsLinkItem = {
href: string;
action?: (event: React.MouseEvent<HTMLElement, MouseEvent> | KeyboardEvent) => void;
} & BaseBreadcrumbsItem;

export type ButtonBreadcrumbsItem = {
export type BreadcrumbsButtonItem = {
href?: undefined;
action: (event: React.MouseEvent<HTMLElement, MouseEvent> | KeyboardEvent) => void;
} & BaseBreadcrumbsItem;

export type BreadcrumbsItem = LinkBreadcrumbsItem | ButtonBreadcrumbsItem;
export type BreadcrumbsItem = BreadcrumbsLinkItem | BreadcrumbsButtonItem;

export interface BreadcrumbsProps<T extends BreadcrumbsItem = BreadcrumbsItem> extends QAProps {
items: T[];
Expand Down

0 comments on commit db09f93

Please sign in to comment.