react-native-warnings

1.0.8 • Public • Published

react-native-warnings

Description

Warning library for react native highly customizable.

Install

$ yarn add react-native-warnings

Demo

Examples

import React from "react";
import { StyleSheet, Text, View } from "react-native";
import { Warnings } from "react-native-warnings";

export default function App() {
  return (
    <View style={styles.container}>
      {/* <Warnings
        color="red"
        fontColor="white"
        message="Request failed"
        visible={true}
      /> */}
      <Warnings
        color="green"
        fontColor="white"
        message="Request success"
        visible={true}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
});

Documentation

Props                     Type                  Description                                                 Usage
----------------------------------------------------------------------------------------------------------------------
visible                   {boolean}             warnings visibility                                         (mandatory)
message                   {string}              warnings message                                            (mandatory)
color                     {string}              warnings backgorund color                                   (mandatory)
fontColor                 {string}              message color                                               (mandatory)

Package Sidebar

Install

npm i react-native-warnings

Weekly Downloads

2

Version

1.0.8

License

ISC

Unpacked Size

18.5 kB

Total Files

8

Last publish

Collaborators

  • jemorini