Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

klaby/react-minimal-breadcrumb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

... React Minimal Breadcrumb ...

Built with ❤︎ by Romullo

React Minimal Breadcrumb is an easy way to generate your breadcrumbs tracks.

✓ Instalation

Install

yarn add react-minimal-breadcrumb

or

npm i react-minimal-breadcrumb

✓ Structure

├── node_modules
├── src
│   ├── Breadcrumb.js
│   ├── index.js
├── .editorconfig
├── .gitignore
├── .travis.yml
├── package.json
├── README.md
├── LICENCE.md
├── logo.png
└── rmb.png

✓ How to use

React Minimal Breadcrumb uses the react-router-dom. to use it in your project you need to include it inside the switch passing the property routes with a defined route

routes.js

const Routes = [
  {
    route: '/',
    name: 'Dashboard',
    icon: 'fas fa-tachometer-alt',
    page: pages.Dashboard,
  },
  {
    route: '/users',
    name: 'Users',
    icon: 'fas fa-users',
    page: pages.Users,
  },
]

export default Routes;

Switch

With the routes defined .. now you just need to include your by passing the prop routes with the routes.

import { Switch } from 'react-router-dom';
import Breadcrumb from 'react-minimal-breadcrumb';

  <Switch>
    <Breadcrumb routes={routes} />
  </Switch>

✓ Finishing

If everything went well you will have a result as in the example below. :)

Demo

✓ License

MIT © Romullo

Releases

No releases published

Packages

No packages published