-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Rename Breadcrumb Item to Link (#1232)
- Loading branch information
1 parent
fd668c1
commit 6cf2e5e
Showing
9 changed files
with
66 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* @license EUPL-1.2+ | ||
* Copyright Gemeente Amsterdam | ||
*/ | ||
|
||
import { clsx } from 'clsx' | ||
import { forwardRef } from 'react' | ||
import type { AnchorHTMLAttributes, ForwardedRef } from 'react' | ||
|
||
export type BreadcrumbLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> | ||
|
||
export const BreadcrumbLink = forwardRef( | ||
({ children, className, ...restProps }: BreadcrumbLinkProps, ref: ForwardedRef<HTMLAnchorElement>) => ( | ||
<li className="ams-breadcrumb__item"> | ||
<a {...restProps} className={clsx('ams-breadcrumb__link', className)} ref={ref}> | ||
{children} | ||
</a> | ||
</li> | ||
), | ||
) | ||
|
||
BreadcrumbLink.displayName = 'Breadcrumb.Link' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { Breadcrumb } from './Breadcrumb' | ||
export type { BreadcrumbProps } from './Breadcrumb' | ||
export type { BreadcrumbItemProps } from './BreadcrumbItem' | ||
export type { BreadcrumbLinkProps } from './BreadcrumbLink' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters