Gathering detailed insights and metrics for react-native-toast-me
Gathering detailed insights and metrics for react-native-toast-me
Gathering detailed insights and metrics for react-native-toast-me
Gathering detailed insights and metrics for react-native-toast-me
npm install react-native-toast-me
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
17 Commits
2 Watching
1 Branches
1 Contributors
Updated on 13 Feb 2018
JavaScript (37.6%)
Objective-C (36.49%)
Python (14.29%)
Java (11.62%)
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
25%
5
Compared to previous week
Last month
37.5%
22
Compared to previous month
Last year
-36.8%
342
Compared to previous year
This component make you easy to handle the exception message.
npm install react-native-toast-me
or yarn add react-native-toast-me
1import React, { Component } from 'react' 2import { Text, View, TouchableHighlight } from 'react-native' 3 4... 5 6// Import ToastMe from react-native-toast-me 7import ToastMe from 'react-native-toast-me' 8 9// Sample custom button components. 10const MyButton = ({ callToast, type }) => ( 11 <TouchableHighlight 12 onPress={callToast} 13 underlayColor="#dddddd" 14 style={{ 15 marginTop: 20, 16 height: 60, 17 justifyContent: 'center', 18 alignItems: 'center', 19 backgroundColor: '#ededed', 20 borderWidth: 1, 21 borderColor: '#dddddd' 22 }}> 23 <Text>Call {type}</Text> 24 </TouchableHighlight> 25) 26 27export default class Sample extends Component { 28 29 constructor(props) { 30 super(props) 31 this.state = { 32 33 // Set default state to handle the message 34 // message : The message you want to show. 35 // type: The type of message with string (success, error, warning, info) 36 // isToggle: To toggle the message box in bool 37 message: '', 38 type: 'success', 39 isToggle: false, 40 } 41 } 42 43 toggleMessageBox = (message, type) => { 44 this.setState({ 45 isToggle: !this.state.isToggle, 46 message: message, 47 type: type 48 }) 49 } 50 51 render() { 52 return ( 53 <View style={{ flex: 1 }}> 54 55 <View style={{ margin: 10, justifyContent: 'center' }}> 56 <MyButton 57 type="success" 58 callToast={() => this.toggleMessageBox('Success toast called!', 'success')} 59 /> 60 <MyButton 61 type="error" 62 callToast={() => this.toggleMessageBox('Error toast called!', 'error')} 63 /> 64 <MyButton 65 type="warning" 66 callToast={() => this.toggleMessageBox('Warning toast called!', 'warning')} 67 /> 68 <MyButton 69 type="info" 70 callToast={() => this.toggleMessageBox('Info toast called!', 'info')} 71 /> 72 </View> 73 <ToastMe 74 type={this.state.type} 75 message={this.state.message} 76 visible={this.state.isToggle} /> 77 </View> 78 ) 79 } 80} 81
type
- The type of message to handle (success, warning, error, info).
message
- The message you want to show inthe box.
visible
- the state to toggle message box (default is false
).
This is pretty basic at the moment, but if you have new features, requests, or would like to contribute feel free to open a PR and ping me!
No vulnerabilities found.
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
Found 0/17 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
96 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn Morereact-native-toast-message
Toast message component for React Native
toastify-react-native
🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!
react-native-root-toast
react native toast like component, pure javascript solution
react-native-simple-toast
Cross-platform Toast experience for React Native