Skip to content

Commit

Permalink
feat(Breadcrumbs): export LinkBreadcrumbsItem & `ButtonBreadcrumbsI…
Browse files Browse the repository at this point in the history
…tem` types (#1435)
  • Loading branch information
smsochneg authored Mar 21, 2024
1 parent b8c79e1 commit e5fde1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Breadcrumbs/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ type BaseBreadcrumbsItem = {
title?: string;
};

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

type ButtonBreadcrumbsItem = {
export type ButtonBreadcrumbsItem = {
href?: undefined;
action: (event: React.MouseEvent<HTMLElement, MouseEvent> | KeyboardEvent) => void;
} & BaseBreadcrumbsItem;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Breadcrumbs/BreadcrumbsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const b = block('breadcrumbs');

export function BreadcrumbsButton(props: {
title: string;
onClick: React.MouseEventHandler<HTMLElement>;
onClick?: React.MouseEventHandler<HTMLElement>;
children: React.ReactNode;
}) {
return <button {...props} type="button" className={b('switcher', {more: true})} />;
Expand Down

0 comments on commit e5fde1b

Please sign in to comment.