Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-simple-toast

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-simple-toast - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

30

index.js
import {NativeModules,ToastAndroid,Platform} from 'react-native';
var RCTToastModule = Platform.OS === 'android' ? ToastAndroid : NativeModules.LRDRCTSimpleToast;
var RCTToastAndroid = Platform.OS === 'android' ? ToastAndroid : NativeModules.LRDRCTSimpleToast;
var SimpleToast = {
SHORT: RCTToastModule.SHORT,
LONG: RCTToastModule.LONG,
show: function (message:string, duration:number):void {
RCTToastModule.show(message, duration === undefined ? this.SHORT : duration);
}
// Toast duration constants
SHORT: RCTToastAndroid.SHORT,
LONG: RCTToastAndroid.LONG,
// Toast gravity constants
TOP: RCTToastAndroid.TOP,
BOTTOM: RCTToastAndroid.BOTTOM,
CENTER: RCTToastAndroid.CENTER,
show: function (
message,
duration
) {
RCTToastAndroid.show(message, duration === undefined ? this.SHORT : duration);
},
showWithGravity: function (
message,
duration,
gravity,
) {
RCTToastAndroid.showWithGravity(message, duration === undefined ? this.SHORT : duration, gravity);
},
};
export default SimpleToast;

2

package.json
{
"name": "react-native-simple-toast",
"version": "0.0.3",
"version": "0.0.4",
"description": "Simple Toast for react-native. In Android it's just native toast, in iOS it's https://github.com/scalessec/Toast",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc