Last active
January 17, 2021 21:19
-
-
Save janizde/01e25aa30563cb4904136d64f13e48de to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const Breadcrumb = classBound.ol('breadcrumb'); | |
const BreadcrumbItem = classBound.li('breadcrumb-item', { isActive: 'active' }); | |
const BreadcrumbLink = classBound.a('breadcrumb-link'); | |
const BreadcrumbContainer: React.FC<{ items: Item[]; activeId: number }> = | |
({ items, activeId }) => ( | |
<Breadcrumb aria-label="breadcrumb"> | |
{items.map(item => { | |
<BreadcrumbItem key={item.id} isActive={item.id === activeId}> | |
<BreadcrumbLink href={item.url} target="_blank">{item.name}</BreadcrumbLink> | |
</BreadcrumbItem> | |
})} | |
</Breadcrumb> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment