NghiepNguyen
NghiepNguyen

Reputation: 21

npm Overlay-navbar can't show icon?

I used Navbar, but the icons are not showing, :((

thist my web this my code

Upvotes: 2

Views: 2817

Answers (2)

Nader Salam
Nader Salam

Reputation: 31

For any one facing this issue. there are 2 steps to be followed to get the icons to show in the navbar

STEP 1

import { ReactNavbar } from "overlay-navbar";
import {MdAccountCircle } from "react-icons/md";
import {MdSearch } from "react-icons/md";
import {MdAddShoppingCart } from "react-icons/md";

STEP 2 Within add as shown below

<ReactNavbar
  profileIcon:true,
  profileIconColor: "rgba(35, 35, 35,0.8)",
  ProfileIconElement: MdAccountCircle, 
  searchIcon:true,
  searchIconColor: "rgba(35, 35, 35,0.8)",
  SearchIconElement:MdSearch,
  cartIcon:true,
  cartIconColor: "rgba(35, 35, 35,0.8)",
  CartIconElement:MdAddShoppingCart,
/>

Upvotes: 3

Anup
Anup

Reputation: 11

Use "overlay-navbar": "^1.2.3" and "react-icons": "^4.2.0" on package.json

and pass profileIcon={true} ProfileIconElement={FaUserAlt}

This worked for me

Upvotes: 1

Related Questions