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

Stars appearing vertically

Open HarkiratShopism1 opened this issue 1 year ago • 13 comments

I am using tailwind css in my project and after I installed tailwind I am experiencing a vertical alignment of stars

Can someone help me sort this out.

HarkiratShopism1 avatar Nov 07 '23 08:11 HarkiratShopism1

I am also facing the same issue in my Next.js and Tailwind projects. image when I pass the props emptyClassName="flex" no change but when I pass the props emptyStyle={{display:"flex"}} will render horizontally but not function as it should be Specifically, even if I select multiple stars, only the first star shows as filled. See the screenshot below for an example where I selected 4 stars but only the first star is filled: image

baydisng13 avatar Nov 07 '23 16:11 baydisng13

Make the wrapper div flex flex-col h-auto

henaorth16 avatar Nov 07 '23 16:11 henaorth16

Make the wrapper div flex flex-col h-auto I tried to implement the above mentioned suggestion the stars are aligned horizontally after implementing but when I try to select multiple stars, only the first star shows as filled.

HarkiratShopism1 avatar Nov 08 '23 06:11 HarkiratShopism1

@baydisng13 pass the prop "SVGclassName={inline-block}" instead of "emptyStyle={{display:"flex"}}" and hopefully it will fix the problem.

real

Tallal64 avatar Nov 26 '23 05:11 Tallal64

@Tallal64 this does not resolve the issue for me. Instead, i set SVGstyle={{ display: 'inline-block' }} which resolved the issue.

m-lyon avatar Jan 06 '24 00:01 m-lyon

Hey, That works for me

<Rating
            SVGclassName={'nline-block'}
            initialValue={4}
            readonly={true}/>

undermad avatar Feb 11 '24 01:02 undermad

I am also facing the same issue in my Next.js and Tailwind projects. image when I pass the props emptyClassName="flex" no change but when I pass the props emptyStyle={{display:"flex"}} will render horizontally but not function as it should be Specifically, even if I select multiple stars, only the first star shows as filled. See the screenshot below for an example where I selected 4 stars but only the first star is filled: image

thanks its work for me

zaadevofc avatar Apr 09 '24 04:04 zaadevofc