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-component

v1.0.7

Published

Alert component for react native to display messages, warnings, and errors with light and dark theme support.

Downloads

32

Readme

React Native Alert Component

A beautifully designed and responsive inline Alert component made with React Native for iOS and Android mobile and Tablet components.

Why use react-native-alert-component?

Our research study on user experience found that small-screen devices, such as mobile phones, have a confusing layout that becomes even more uncomfortable when alert messages appear on top of an existing page. These alert messages are often not responsive on all screen sizes and types, which can hinder the user experience. For example, when a user enters an invalid email address while trying to log in, they may be repeatedly interrupted by error messages that obstruct the functionality of the app.

To address this issue, we have introduced in-line alert messages that are integrated with the app's layout. These messages can be dismissed by the user and do not interfere with the app's ongoing functionality. The purpose of these messages is to simply remind the user that they entered something incorrectly and provide a way to resolve it, without hindering their ability to use the app.

Getting Started

  • Install the component in your react native app:
npm install react-native-alert-component --save
  • Import:
import AlertComponent from 'react-native-alert-component';
  • Use:
<AlertComponent message="This is a warning message." colorScheme="light" type="warning" />

Properties (Props)

  • type ('message' | 'warning' | 'error'): This property indicates if the alert is a message, warning, or an error. Each type is identified with a different color and icon. By default, type = "message"

  • message (JSX element | string): This property specifies the message to display in the alert.

  • colorScheme ('light' | 'dark'): This property sets the color scheme of the progressbar to either light or dark. To get the device's default color scheme, you can use the useColorScheme hook (https://reactnative.dev/docs/usecolorscheme). By default, colorScheme = 'light'

Example usage:

import { StatusBar } from 'expo-status-bar';
import { SafeAreaView, StyleSheet, View, Text } from 'react-native';
import AlertComponent from "react-native-alert-component";


export default function App() {
  return (
    <SafeAreaView style={{ backgroundColor: '#fff', flex: 1, alignItems: 'center' }}>
      <View>
        <Text style={{ fontSize: 24, color: '#000', paddingVertical: 15, fontWeight: 'bold' }}>
          React Native Alert Component
        </Text>
      </View>
      <View style={styles.container}>
        <AlertComponent message="This is a simple message." colorScheme="light" type="message" />
        <AlertComponent message="This is a warning message." colorScheme="light" type="warning" />
        <AlertComponent message="This is an error message." colorScheme="light" type="error" />
      </View>
      <StatusBar style="light" />
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    marginVertical: 25,
    alignItems: 'center',
    borderRadius: 10
  },
});

Contributor Details

Our commitment at Continuity Browser is to foster collaboration with the open-source community and provide developers with the tools they need to succeed.

Continuity Browser provides you with a seamless, secure, and productive browsing experience.

You can download the app here: https://continuitybrowser.com/#download

With our app, you can easily sync all your tabs across all your devices in real-time.

Continuity Browser also prioritizes your privacy and security by providing better privacy reports and prevention measures than mainstream browsers like Google Chrome and Apple Safari.

Furthermore, our app features a built-in ChatGPT in the browser that allows you to get results with the click of a button from Google Search, making your browsing experience even more productive.

You can join our Discord Community at https://discord.gg/TwJ863WJsQ to connect with our open source community, users, developers, and provide feedback to the Continuity Browser Team.

Thank you 🎉