Skip to content

Commit

Permalink
feat: add restProps support for BreadcrumbLink
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Sep 18, 2023
1 parent d621927 commit 3ac1424
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/component-library-react/src/BreadcrumbNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,16 @@ export interface BreadcrumbLinkProps extends HTMLAttributes<HTMLElement> {

export const BreadcrumbLink = forwardRef(
(
{ children, current, href, index, rel, Link = UtrechtLink, className }: PropsWithChildren<BreadcrumbLinkProps>,
{
children,
current,
href,
index,
rel,
Link = UtrechtLink,
className,
...restProps
}: PropsWithChildren<BreadcrumbLinkProps>,
ref: ForwardedRef<HTMLAnchorElement>,
) => {
const DefaultLinkComponent = Link;
Expand All @@ -112,6 +121,7 @@ export const BreadcrumbLink = forwardRef(
rel={rel}
aria-current={current && 'location'}
{...useMicrodataProp('item')}
{...restProps}
ref={ref}
>
<span className="utrecht-breadcrumb__text" {...useMicrodataProp('name')}>
Expand Down

0 comments on commit 3ac1424

Please sign in to comment.