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

Custom Icon? #8

Open
anshulasethi opened this issue Jul 10, 2020 · 1 comment
Open

Custom Icon? #8

anshulasethi opened this issue Jul 10, 2020 · 1 comment

Comments

@anshulasethi
Copy link

Thanks for library.

Can i pass custom icon from react-native-vector-icons?

@ksti
Copy link
Owner

ksti commented Aug 19, 2020

you can pass custom icon like this:

<StarRatingBar
    score={2.3}
    starStyle={{
        width: 20,
        height: 20,
    }}
    readOnly={false}
    continuous={true}
    allowsHalfStars={true}
    accurateHalfStars={true}
    emptyStarImage={<Icon name="heart-o" size={20} color="#999"/>}
    filledStarImage={<Icon name="heart" size={20} color="red"/>}
    scoreTextStyle={{marginLeft: 10, color:'red'}}
/>

I updated the demo code using Icon

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

2 participants