react-navigation-pickupbiz

0.1.9 • Public • Published

pickupbiz logo

Installation

npm i react-navigation-pickupbiz
npm i react-router-dom

Usage in your app

Import to App.js

import { BrowserRouter, Routes, Route } from "react-router-dom";
import { Counter } from "./components/Counter";
import { ProductsList } from "./components/ProductsList";
import { BikeList } from "./components/BikeList";
import { NavBarModern1 } from "react-navigation-pickupbiz";

Add below

return (
  <BrowserRouter>
    <NavBarModern1 links={links} type="modern" />
    <Routes>
      <Route path="/" element={<Counter />} />
      <Route path="/products" element={<ProductsList />} />
      <Route path="/bikes" element={<BikeList />} />
    </Routes>
  </BrowserRouter>
);

Your component follow below steps

Declare the links array

const links = [
  {
    title: "Home",
    icon: "fa fa-home",
    url: "/",
  },
  {
    title: "Products",
    icon: "fa fa-phone-square",
    url: "/products",
  },
  {
    title: "Bikes",
    icon: "fa fa-cogs",
    url: "/bikes",
  },
];

Add the below for Navigation to your component where you want to add it

<NavBarModern1 links={links} />

Add below to your header tag of index.html

<link
  rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>

Reference

https://levelup.gitconnected.com/publish-react-components-as-an-npm-package-7a671a2fb7f

About Us

https://pickupbiz.com/

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.90latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.90
0.1.80
0.1.70
0.1.60
0.1.50
0.1.40
0.1.30
0.1.20
0.1.10
0.1.01

Package Sidebar

Install

npm i react-navigation-pickupbiz

Weekly Downloads

1

Version

0.1.9

License

MIT

Unpacked Size

8.31 kB

Total Files

9

Last publish

Collaborators

  • pickupbiz