@schaman/react-breadcrumb
v2.0.1
Published
Adds breadcrumb functionality to any React application. Use the provider and every child will be shown in the breadcrumb.
Downloads
4
Readme
@schaman/react-breadcrumb
Adds breadcrumb functionality to any React application. Use the provider and every child will be shown in the breadcrumb.
<BreadcrumbContextProvider>
<Breadcrumb>Test1</Breadcrumb>
{/* Here you can add routes, also. */}
<div>
<Breadcrumb>Test2</Breadcrumb>
</div>
<BreadcrumbRenderer />
</BreadcrumbContextProvider>
To customize styles wrap the component:
function FancyBreadcrumb({ children }) {
return (
<Breadcrumb>
<FancyComponent>{children}</FancyComponent>
</Breadcrumb>
);
}
Running unit tests
Run nx test react-breadcrumb
to execute the unit tests via Jest.