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-rating
Advanced tools
Readme
Display ratings in your react-native app like a pro. Works on both iOS and Android.
npm i -S react-native-rating
or
yarn add react-native-rating
import Rating from 'react-native-rating'
import { Easing } from 'react-native'
const images = {
starFilled: require('./assets/star_filled.png'),
starUnfilled: require('./assets/star_unfilled.png')
}
const myRandoComponent = () => (
<Rating
onChange={rating => console.log(rating)}
selectedStar={images.starFilled}
unselectedStar={images.starUnfilled}
config={{
easing: Easing.inOut(Easing.ease),
duration: 350
}}
stagger={80}
maxScale={1.4}
starStyle={{
width: 40,
height: 40
}}
/>
)
Refer to the propTypes
and defaultProps
definition below:
static propTypes = {
max: PropTypes.number,
initial: PropTypes.number,
onChange: PropTypes.func,
config: PropTypes.shape({
easing: PropTypes.func.isRequired,
duration: PropTypes.number.isRequired
}),
editable: PropTypes.bool,
stagger: PropTypes.number,
maxScale: PropTypes.number,
starStyle: ViewPropTypes.style,
containerStyle: ViewPropTypes.style,
selectedStar: PropTypes.number.isRequired,
unselectedStar: PropTypes.number.isRequired,
onAnimationComplete: PropTypes.func
}
static defaultProps = {
max: 5,
initial: 0,
onChange: () => {},
config: {
easing: Easing.elastic(1),
duration: 400
},
stagger: 100,
maxScale: 1.1,
starStyle: {
width: 36,
height: 36
},
editable: true,
containerStyle: { flexDirection: 'row' },
onAnimationComplete: () => {}
}
MIT
FAQs
A stars rating component for react-native built with the Animated API
The npm package react-native-rating receives a total of 33 weekly downloads. As such, react-native-rating popularity was classified as not popular.
We found that react-native-rating 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.