Socket
Socket
Sign inDemoInstall

react-native-rating-star

Package Overview
Dependencies
742
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-rating-star

A React Native component for generating and displaying interactive star ratings


Version published
Weekly downloads
12
increased by20%
Maintainers
1
Install size
46.4 MB
Created
Weekly downloads
 

Readme

Source

React Native Star Rating Component

A React Native component for generating and displaying interactive star ratings. Compatible with both iOS and Android.

#Installation

npm install react-native-rating-star --save

#Usage

import StarRating from 'react-native-rating-star';
class StarRaingDemo extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
        StarRating not set starSize and interitemSpacing.
        </Text>
        <StarRating
          maxStars={5}
          rating={1}
          selectStar={require('./select_star.png')}
          unSelectStar={require('./unselect_star.png')}
          valueChanged={this._valueChanged}
        />
        <Text style={styles.welcome}>
        StarRating set starSize.
        </Text>
        <StarRating
          maxStars={5}
          rating={2}
          selectStar={require('./select_star.png')}
          unSelectStar={require('./unselect_star.png')}
          valueChanged={this._valueChanged}
          starSize={25}
        />
        <Text style={styles.welcome}>
        StarRating set starSize and interitemSpacing
        </Text>
        <StarRating
          maxStars={5}
          rating={3}
          selectStar={require('./select_star.png')}
          unSelectStar={require('./unselect_star.png')}
          valueChanged={this._valueChanged}
          starSize={50}
          interitemSpacing={20}
        />
      </View>
    );
  }

  _valueChanged(rating) {
    console.log(rating);
  }
}

Keywords

FAQs

Last updated on 31 Mar 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc