Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 680 Bytes

README.md

File metadata and controls

30 lines (24 loc) · 680 Bytes

@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.