Png or Jpeg files as icons for Menu Items

UI Components for React
Post Reply
shilpikanade
Posts: 15
Joined: 04 Apr 2018, 19:45

25 Sep 2018, 20:48

Hi,

I am using a css files to create the icon,
.portsIcon {
background: url('../images/ports.jpg');
background-repeat: no-repeat;
background-size: cover;
height: 2.5em;
width: 2.5em;
position: relative;
}

and when I use that in the menu items, it doesn't display, it worked great in Primereact 1.5 and desn't in 2.0

Any ideas?

Thanks,

shilpikanade
Posts: 15
Joined: 04 Apr 2018, 19:45

25 Sep 2018, 21:08

And if I use className = 'portsIcon', it works but when I hover over it because my label is null, it goes blank, instead of keeping the image and just changing the background color

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests