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-alert-prompt

v0.0.6

Published

An ios and android alert that includes a prompt for the user. Styled using ios design and material design by default.

Downloads

27

Readme

react-native-alert-prompt

Changes in 0.0.6

  • No breaking changes.
  • Now able to show just an alert to the user, and not include the prompt input.
  • Fixes checkPrompt()

Install

Install via npm:

 npm install react-native-alert-prompt --save

Usage

 import { AlertPrompt } from 'react-native-alert-prompt';
 <AlertPrompt
   alertOnly={false}
   animation={"fade"}
   androidColor={'rgba(0, 150, 136,1)'}
   checkDelay={20}
   autoFocus={true}
   cancelButtonText={'Cancel'}
   confirmButtonText={'Confirm'}
   placeHolderText={'Enter here'}
   validationCaseSensitive={false}
   validationText={'DELETE'}
   visible={this.state.alertVisible}
   alertSubject={"Are you sure?"}
   promptText={<Text>Are you sure you want to delete this account?  Enter exactly DELETE to delete it.</Text>}
   rePromptText={this.rePromptText}
   successfulAnswer={() => this.setState({ alertVisible: false, deleted: this.state.deleted+1 })}
   closePrompt={() => this.setState({ alertVisible: false})}
 />

Props

| Prop | Type | Optional | Default | Description | | ------------------- | ------------- | --------- | ------- | --------------------------------------------------------------------------------------- | | validationCaseSensitive | boolean | No | true | Whether the validation on the text input is case sensitive or not. | | validationText | string | No | 'DELETE' | The text to compare with the user's inputted text to determine a sucessful answer or not. | | visible | boolean | No | - | Whether the alert is visible or not. Typically triggered by an action. | | alertSubject | string | No | - | The title of the alert. | | promptText | string | No | - | The initial text prompting the user. | | rePromptText | string | No | - | The text prompting the user if they get the answer wrong. | | successfulAnswer | callback function | No | - | On a successful answer, what would you like to do? | | closePrompt | callback function | No | - | If the alert wants to close itself. Typically setting root component visible state to false. | | animation | string | Yes | fade | Matches RN's animationType on modal. (fade, slide, none) | | androidColor | color value | Yes | 'rgba(0, 150, 136,1)' | The color of the cursor and text input box on Android. | | checkDelay | integer (milliseconds) | Yes | 250 | The delay between the initial prompt, and the reprompt if the user submits the wrong text. | | autoFocus | boolean | Yes | true | Whether the text input auto focuses on alert show. | | cancelButtonText | string | Yes | 'Cancel' | The text shown for the cancel option. | | confirmButtonText | string | Yes | 'Confirm' | The text shown for the confirm option. | | placeHolderText | string | Yes | 'Enter here' | The placeholder text shown in the text input. | | alertOnly | boolean | Yes | false | Whether the prompt should include a prompt (set this to false, or just don't include it), or just be an alert (set as true).

Contributions/Suggestions

Feel free to add issues and PRs. As with any project, there are things to improve!