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-custom-view

v1.0.6

Published

自定义view,包含dialog,loading,modal,toast

Downloads

7

Readme

github https://github.com/90Mark/react-native-custom-view

本文档,适用于ReactNative 项目

目前共提供四个组件

Dialog Loading Modal Toast


使用方法:

安装

npm install react-native-custom-view --save

导入

import { Dialog, Loading, Modal, Toast} from 'react-native-custom-view'

具体可参考源码,这里列举的是常用的方法


-Dialog---

  • @note leftVisible 显示左侧按钮
  • @note canHide 可以隐藏(返回键、点击空白区域)
  • @note title 标题
  • @note titleColor 标题颜色
  • @note titleSize 标题大小
  • @note message 消息
  • @note messageColor 消息字体颜色
  • @note messageTextSize 消息字体大小
  • @note leftText 左侧按钮文字
  • @note leftColor 左侧按钮颜色
  • @note leftPress 左侧按钮点击回调
  • @note rightText 右侧按钮文字
  • @note rightColor 右侧按钮颜色
  • @note rightPress 右侧按钮点击回调
  • @note transparent 透明
  • @note onShow 显示回调
  • @note onDismiss 隐藏回调

简单使用

Dialog.show({
  title: '标题',
  subTitle: '子标题'
})

-Toast---

// 普通吐司

Toast.show('message')

// 带图片的吐司

Toast.showError('message')
Toast.showSuccess('message')
Toast.showWarning('message')

-Loading---

带菊花的loading

Loading.show('请稍等')
Loading.hide()

-Modal---

  • @param options 参数
  • @note onRequestClose 拦截Android返回键
  • @note transparent 透明
  • @note onShow 显示回调
  • @note onDismiss 隐藏回调
var modal = Modal.show(render(options), options)

Modal.hide(modal, onDismiss)

其他不常用的可参考源码

有任何疑问或建议可在评论区留言

_by 90Mark