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

codepin

v0.0.6

Published

this is a react-native component for a implements a code pin view in your project.

Downloads

16

Readme

react-native-code-pin

License npm Version npm Downloads This is a react-native component for a implements a code pin view in your project

Attention: This package is under development and evolution over time Contributions are welcome!

Installation

npm install --save pincode

or

yarn add pincode

Basic Usage

Basic usage requires Code and Size.

  • Size : requires the size of the code
import PinCode from 'pincode'

<PinCode Size={4} />

Options

| Key | Description | Required | Default | Type | |---|---|---|---|---| |ForgetText|Change the text of the forget method |false|forget|string| |ForgetMethod|take as a parameter a function to execute when forget is called|false|() => (console.log('forget')|func| |Size|is a size of the code |true|4|number| |Random|return the keyboard keys randomly|false|false|boolean| |eventCode|is a function that takes in parameter the password typed by the user, a error function and a loading function|???| (event, error, loading) => {}|func|

Example

basic use of eventCode prop

...
import PinCode from 'pincode'

export default Example extends Component {
  ...
  checkCode = (event, loading, error) => {
    if(event == 'this.state.YourCode'){
      loading(true);
      setTimeout(() => {
          loading(false)
      }, 5000);
    } else {
      error();
    }
  }
  
  render(){
    return (
        <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}> 
          <PinCode Size={4} eventCode={this.checkCode}/>
        </View>
    )
  }
}

Utilisation

  • eventCode(event, error, loading)
  • event() return the code entered by the user
  • error() clear the animation
  • loading(value) stop the loading animation value by default egal false

Styles

| Key | Description | Default | Type | |---|---|---|---| |TextColor|change color of the keyboard text|'#5262F3'|string| |BorderColor|change color of the Keyboard border|'rgba(0,0,0,0.1)'|string| |PinColor|Change color of the pin code |turquoise|string| |FontSize|sets the font size|30|number| |CodeColor|is an array of the different colors of the animation|['#EB5088', '#72C1FA', '#F5D679', '#76ECC9', '#5468F3', 'red']|arrayOf(string)| |ImageSize|size of the icon|{height: 15, width:20}|object(height, width)| |ImageLocation|link to the icon|require('./assets/icons/backspace-arrow.png')|any|