MadnessLabs / enjin-components

A set of components to help the app building process
MIT License
36 stars 6 forks source link

Is there a way to give half starts ? #12

Open abhilashdonepudi opened 4 years ago

abhilashdonepudi commented 4 years ago

The component is rounding to the nearest start. Any way to create a half star ? Any plans to offer that ?

popcorn245 commented 3 years ago

Sorry for my non-existent reply @abhilashdonepudi , life got away from me here. To answer your question, I hadn't planned on it, but I have started to take a crack at it just for you. The basic approach I was going to take was have a prop for halves and if it's true then I just apply a special class so I can make half-stars instead of stars and then I would double the number of inputs created and TADA! The tricky part is the logic for alternating the star halves, maybe a CSS transform on odd elements.. 🤔