diff --git a/package.json b/package.json index 0f992ff..44b766d 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,22 @@ { - "name": "react-native-in-app-notification", - "version": "3.0.0", - "description": "Customisable in-app notification component for React Native", + "name": "react-native-notification-in-app", + "version": "1.0.0", + "description": "Customisable in-app notification component for React Native - Fork of robcalcroft react-native-in-app-notification package.", "main": "src/index.js", - "repository": "https://github.com/robcalcroft/react-native-in-app-notification.git", - "author": "Rob Calcroft ", + "repository": { + "type" : "git", + "url" : "https://github.com/CocoJr/react-native-in-app-notification" + }, + "author": { + "name": "Thibault Colette", + "email": "thibaultcolette06@gmail.com" + }, + "contributors": [ + { + "name": "Rob Calcroft", + "email": "rob@calcroft.com" + } + ], "license": "MIT", "scripts": { "lint": "eslint Notification.js DefaultNotificationBody.ios.js DefaultNotificationBody.android.js" diff --git a/src/DefaultNotificationBody/index.android.js b/src/DefaultNotificationBody/index.android.js index 5d94b94..cb3a3a4 100644 --- a/src/DefaultNotificationBody/index.android.js +++ b/src/DefaultNotificationBody/index.android.js @@ -110,8 +110,8 @@ DefaultNotificationBody.propTypes = { }; DefaultNotificationBody.defaultProps = { - title: 'Notification', - message: 'This is a test notification', + title: null, + message: null, vibrate: true, isOpen: false, iconApp: null, diff --git a/src/DefaultNotificationBody/index.ios.js b/src/DefaultNotificationBody/index.ios.js index 6bbce28..ca14c7f 100644 --- a/src/DefaultNotificationBody/index.ios.js +++ b/src/DefaultNotificationBody/index.ios.js @@ -149,8 +149,8 @@ DefaultNotificationBody.propTypes = { }; DefaultNotificationBody.defaultProps = { - title: 'Notification', - message: 'This is a test notification', + title: null, + message: null, vibrate: true, isOpen: false, iconApp: null, diff --git a/src/Notification.js b/src/Notification.js index 68ade1a..9d1f328 100644 --- a/src/Notification.js +++ b/src/Notification.js @@ -108,7 +108,7 @@ class Notification extends Component { const height = baseHeight + this.heightOffset; - return ( + return isOpen && (