@brighthr/component-breadcrumb v2.0.2
Breadcrumb
Previously the Breadcrumb took a routes
prop which was an object that contained the href, the name of the breadcrumb to display, and an optional iconName, which was rendered within the component as an a
tag. This meant that it wasn't possible to utilise the Link
from React-Router or NextJS, so the decision was made in version 2.0 to make the component less opinionated let the consuming app dictate the kind of link to display.
To install, type the following into the command line at the root of your project:
npm i @brighthr/component-breadcrumb
To implement the Breadcrumb component into your project you’ll need to add the import:
import Breadcrumb from '@brighthr/component-breadcrumb';
After adding import into your project you can use it simply like:
<Breadcrumb>
<Link> First Page</Link>
<Link> Second Page</Link>
<Link> Third Page</Link>
</BreadCrumb>
Props
Name | Type | Default | Description |
---|---|---|---|
currentPage | string | Sets the text to display what the current page is. | |
size | 'sm' 'base' 'lg' 'xl' | 'base' | Sets the size of the breadcrumb. |
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago