Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-bpk-component-star-rating

Package Overview
Dependencies
Maintainers
5
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-bpk-component-star-rating

Backpack React Native rating star component.

  • 3.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

react-native-bpk-component-star-rating

Backpack React Native star rating component.

Installation

npm install react-native-bpk-component-star-rating --save-dev

Usage

import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';
import StarRating from 'react-native-bpk-component-star-rating';
import { spacingBase } from 'bpk-tokens/tokens/base.react.native';

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    padding: spacingBase,
  }
});

const ratingLabel = (r, m) => `${r} out of ${m} stars`;

export default class App extends Component {
  render() {
    return (
      <View style={styles.container}>
        <StarRating rating={0} ratingLabel={ratingLabel}/>
        <StarRating rating={5} ratingLabel={ratingLabel}/>
        <StarRating rating={10} maxRating={10} ratingLabel="10 out of 10"/>
      </View >
    );
  }
}

Props

PropertyPropTypeRequiredDefault Value
ratingLabeloneOfType(string, func)true-
ratingnumberfalse0
maxRatingnumberfalse5

Theme Props

  • starColor
  • starFilledColor

FAQs

Package last updated on 26 Feb 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc