voronianski / react-star-rating-component

Basic React component for star (or any other icon based) rating elements
http://voronianski.github.io/react-star-rating-component/example
MIT License
380 stars 77 forks source link

How to custom star style #46

Open nguyenhuutinh opened 6 years ago

nguyenhuutinh commented 6 years ago

Hello Thanks for this. I have a question> how can I change the star style? I want to increase the font size. Thanks

szilagyiabo commented 6 years ago

I placed it in a div and added style to that div like:

<div className="rating-stars">
  <StarRatingComponent 
        ...args...
   />
</div>
.rating-stars {
    margin-left: 12px;
    font-size: 12px;
}

I know it is a late response but hope it helped.

Abo

sumit151199 commented 5 years ago

This method not working

I placed it in a div and added style to that div like:

<div className="rating-stars">
  <StarRatingComponent 
        ...args...
   />
</div>
.rating-stars {
    margin-left: 12px;
    font-size: 12px;
}

I know it is a late response but hope it helped.

Abo

this is not working

BrunoVukasovic commented 5 years ago

You can change font size like this: <StarRatingComponent className={"Rating"} name="rating" /> In CSS file: .Rating { font-size: 10px; } Same as any other react component.