Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-native-star-rating-view
Advanced tools
Readme
StarRatingView for react-native, supporting decimal fraction and sliding rating. Inspired by HCSStarRatingView
see the Demo
Note: need react-native-vector-icons
If you do not want to import react-native-vector-icons
,
try the purejs branch
npm install react-native-star-rating-view --save
import StarRatingBar from 'react-native-star-rating-view/StarRatingBar'
...
// readOnly, allow accurate value(只读、显示小数)
<StarRatingBar
score={2.3}
dontShowScore={false} // true: not show the score text view
allowsHalfStars={true}
accurateHalfStars={true}
/>
// sliding rating, not allow accurate value(滑动打分、不允许小数)
<StarRatingBar
readOnly={false}
continuous={true}
score={3.7}
onStarValueChanged={(score) => {
console.log('new score:' + score);
}}
/>
// sliding rating, allow accurate value(滑动打分、精确到小数)
<StarRatingBar
starStyle={{
width: 20,
height: 20,
}}
readOnly={false}
continuous={true}
score={3.7}
allowsHalfStars={true}
accurateHalfStars={true}
onStarValueChanged={(score) => {
console.log('new score:' + score);
}}
/>
// readOnly(默认只读、不显示小数)
<StarRatingBar
score={2.3}
//emptyStarColor='#ff6666'
//tintColor='#ff6666'
emptyStarImage={<Image style={{width:16, height: 16}} source={{uri: 'emptyStar.png: your image path'}} />}
filledStarImage={<Image style={{width:16, height: 16}} source={require('star.png: your image path')} />}
scoreTextStyle={{color:'#ff6666'}}
/>
// customize star size(自定义尺寸大小)
<View style={{height: 60, flexDirection: 'row', alignItems: 'center'}}>
<StarRatingBar
score={2.3}
//emptyStarColor='#ff6666'
//tintColor='#ff6666'
starStyle={{
width: 26,
height: 26,
}}
emptyStarImage={<Image style={{width: 26, height: 26}} source={{uri: 'emptyStar.png: your image path'}} />}
filledStarImage={<Image style={{width: 26, height: 26}} source={require('star.png: your image path')} />}
scoreTextStyle={{color:'#ff6666'}}
/>
</View>
MIT
FAQs
StarRatingView for react-native, supporting decimal fraction and sliding rating.(星星评价打分组件:支持小数、滑动打分)
The npm package react-native-star-rating-view receives a total of 111 weekly downloads. As such, react-native-star-rating-view popularity was classified as not popular.
We found that react-native-star-rating-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.