Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rating icons display vertically #29

Open
maxratajczak opened this issue Oct 19, 2022 · 9 comments
Open

Rating icons display vertically #29

maxratajczak opened this issue Oct 19, 2022 · 9 comments

Comments

@maxratajczak
Copy link

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

@awran5
Copy link
Owner

awran5 commented Oct 20, 2022

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;
}

@sumanthpweb11
Copy link

Tried it all Shows Vertical please fix it

@micartey
Copy link

I have the same issue 👀

@HardeepsinhSodha
Copy link

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"
/>

@yuuriresende
Copy link

Thanks @HardeepsinhSodha !!

@OttlikG
Copy link

OttlikG commented Jan 6, 2023

The following fixed me:

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

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

@michael-2509
Copy link

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

@Baalamurgan
Copy link

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

Same issue here!

@pmkod
Copy link

pmkod commented Oct 21, 2023

#41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants