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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-ms

v0.1.0

Published

效果图 ![main](http://47.93.103.19:5900/ms.gif) ### [看不到效果图请移步](https://www.cnblogs.com/zhenfei-jiang/p/9454352.html)

Readme

react-native-ms

效果图 main

看不到效果图请移步

Install react-native-ms

Using npm:

npm install react-native-ms --save

Usage

Using via import:

import { TipModal } from 'react-native-ms';
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View,Button} from 'react-native';


export default class App extends Component {
  /* 打开loading弹出框 */
	loading(){
		this.refs.tipModal._loading()
	}
  /* 打开成功提示框,参数一是提示内容,参数二是多少时间自动关闭*/
	_success(){
		this.refs.tipModal._success('成功了',500)
	}
  /* 打开失败提示框,参数一是提示内容,参数二是多少时间自动关闭*/
	_error(){
		this.refs.tipModal._error('失败了',500)
	}
	render() {
		return (
			<View style={styles.container}>
				<TipModal ref="tipModal"/>
				<Button title="loading" onPress={this.loading.bind(this)}/>
				<Button title="_success" onPress={this._success.bind(this)}/>
				<Button title="_error" onPress={this._error.bind(this)}/>
			</View>
		);
	}
}

Props

1.animationType

提示框的出现和消失运动形式 none | fade (default) | slide

  • none 没有任何运动效果
  • fade 从屏幕中间隐现
  • slide 从屏幕地下滑到中间
<TipModal ref="tipModal"
  animationType='slide'
/>

2.successIconComponent

组件有默认的成功提示图片,但是并不能符合所有人要求,使用如下

<TipModal ref="tipModal"
  successIconComponent={
    <Icon 
      color = '#FFFFFF'
      type = 'evilicon'
      name = 'check'
      size = { 30 }
    />
  }
/>

3.errorIconComponent

组件有默认的成功提示图片,但是并不能符合所有人要求,使用如下

<TipModal ref="tipModal"
  errorIconComponent={
    <Icon 
      color = '#FFFFFF'
      type = 'evilicon'
      name = 'close-o'
      size = { 30 }
    />
  }
/>

ConfirmModal的使用

import {Platform, StyleSheet, Text, View,Button} from 'react-native';
import { ConfirmModal } from 'react-native-ms'
 
 
export default class App extends Component {
  confirm(){
    this.refs.tipModal2._open('默认的提示')
  }
  render() {
    return (
      <View style={styles.container}>    
        <ConfirmModal ref="tipModal2"
		 animationType='slide'        //弹出框出现消失的运动形式  
          confirmFunc={()=>{alert(1)}} //确认按钮按下需要执行的操作       
	     />
        <Button title="confirm" onPress={this.confirm.bind(this)}/>      
      </View>
    );<br>  
    }
}