react-simple-star-rating icon indicating copy to clipboard operation
react-simple-star-rating copied to clipboard

Rating icons display vertically

Open maxratajczak opened this issue 3 years ago • 10 comments

When I display the rating, the icons are stacked vertically, I tried setting it in a flexbox but it didn't help.

Screen Shot 2022-10-19 at 3 30 49 PM Screen Shot 2022-10-19 at 3 31 03 PM

maxratajczak avatar Oct 19 '22 19:10 maxratajczak

Hi @maxratajczak

Try to add the flex className to emptyClassName prop:


<Rating 
...
emptyClassName="flex"
...
 />

Or add some CSS to your stylesheet:

.react-simple-star-rating .filled-icons {
  display: inline-block !important;
}

.react-simple-star-rating .empty-icons {
  display: flex !important;
}

awran5 avatar Oct 20 '22 11:10 awran5

Tried it all Shows Vertical please fix it

sumanthpweb11 avatar Oct 25 '22 11:10 sumanthpweb11

I have the same issue 👀

micartey avatar Oct 30 '22 20:10 micartey

Change SVG element display property from block to inline-block. I am using Tailwind CSS so I can directly do this by adding class "inline-block". You might need to create "inline-block" custom class. <Rating ... SVGclassName="inline-block" />

HardeepsinhSodha avatar Nov 08 '22 14:11 HardeepsinhSodha

Thanks @HardeepsinhSodha !!

yuuriresende avatar Nov 22 '22 14:11 yuuriresende

The following fixed me:

<Rating
    ...
    SVGstyle={{display: "inline-block"}}
/>

By the way I use Chakra UI, its global CSS might break the CSS.

OttlikG avatar Jan 06 '23 19:01 OttlikG

image image @HardeepsinhSodha, @awran5 I am using tailwind and have tried the SVGclassName approach and it still appears vertical

michael-2509 avatar Feb 22 '23 11:02 michael-2509

image image @HardeepsinhSodha, @awran5 I am using tailwind and have tried the SVGclassName approach and it still appears vertical

Same issue here!

Baalamurgan avatar Jul 07 '23 07:07 Baalamurgan

https://github.com/awran5/react-simple-star-rating/issues/41

pmkod avatar Oct 21 '23 21:10 pmkod