npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-rating-modal-box

v1.1.1

Published

The rating component for React Native

Downloads

10

Readme

react-native-rating-modal-box

Installation

$ npm i react-native-rating-modal-box
Or
$ yarn add react-native-rating-modal-box

Basic Usage

  • Install react-native first
$ npm i react-native-cli -g
  • Initialization of a react-native project
$ react-native init myproject
  • Then, edit myproject/index.js, like this:
import React, {useState} from 'react'

import RatingModal from 'react-native-rating-modal-box';

const MyComponent = () => {
  const [isOpenRating, setOpenRating] = useState(true);
  return (
    <RatingModal
        iTunesURL="itms-apps://itunes.apple.com/app/11111"
        playMarketURL="market://details?id=com.myproject.text"
        onClose={() => setOpenRating(false)}
        visible={isOpenRating}
        ratingConfirm={selectedRating => {
          console.log('Selected rating', selectedRating);
        }}
      />
  )
}


AppRegistry.registerComponent('myproject', () => MyComponent)

Properties

Basic

| |type |default |description | |----------------|--------------|-----------------|-----------------------------| |visible|bool | false |If true, modal is visible | |onClose|func | |Call when cancel button pressed | |sendComment|func | |Call when send button pressed, return comment text & select rating {text, selectRating}| |ratingConfirm|func | |Call when user voted, return selectedRating | |changeRating|func | |Call when rating changed, return selectedRating | |iTunesURL|string | |URL to app in iTunes 'itms-apps://itunes.apple.com/app/{APP_ID}' | |playMarketURL|string | |URL to app in PlayMarket 'market://details?id={APP_PACKAGE_NAME}' | |defaultRating|number | 5 |Initial rating | |animationType|string | fade |Modal animation type |
|ratingBoxTitleText|string | |Rating box title text | |cancelBtnText|string |'Cancel' |Cancel button text | |rateBtnText|string |'Rate' |Rate button text | |commentBoxTitle|string | |Comment box title (style props === ratingBoxTitleStyle) | |commentBoxPlaceholder|string | |Comment box input placeholder | |sendBtnText|string | |Styles for send button |

Styles

| |type |default |description | |----------------|--------------|-----------------|-----------------------------| |inputStyle|object | |Comment input styles | |ratingBoxStyle|object | |Styles for rating box | |ratingBoxTitleStyle|object | |Styles for rating box title | |modalContainerStyle|object | |Styles for modal container | |starBtnStyles|object | |Styles for star button | |cancelBtnTextStyles|object | |Styles for cancel button text | |cancelBtnStyles|object | |Styles for cancel button | |rateBtnTextStyles|object | |Styles for rate button text | |rateBtnStyles|object | |Styles for rate button |

Contribution

Made with ♥.