react-native-app-notification
Advanced tools
@@ -98,3 +98,3 @@ "use strict"; | ||
| }; | ||
| _this.renderNotification = function (notification) { return (react_1.default.createElement(AppNotificationWrapper_1.default, __assign({ key: notification.id }, _this.props, notification), _this.props.renderNotification ? (_this.props.renderNotification(notification)) : (react_1.default.createElement(AppNotificationUI_1.default, __assign({}, _this.props, notification, { onPress: notification.panEnabled ? undefined : notification.onPress }))))); }; | ||
| _this.renderNotification = function (notification) { return (react_1.default.createElement(AppNotificationWrapper_1.default, __assign({ key: notification.id }, _this.props, notification), _this.props.renderNotification ? (_this.props.renderNotification(__assign(__assign({}, notification), { close: function () { return _this.removeNotification(notification.id); } }))) : (react_1.default.createElement(AppNotificationUI_1.default, __assign({}, _this.props, notification, { onPress: notification.panEnabled ? undefined : notification.onPress }))))); }; | ||
| AppNotification.ref = _this; | ||
@@ -101,0 +101,0 @@ return _this; |
+4
-1
@@ -29,3 +29,3 @@ import { FunctionComponent } from 'react'; | ||
| animationWrappers?: AnimationWrapperConfig; | ||
| renderNotification?: (props: NotificationOptions) => FunctionComponent; | ||
| renderNotification?: (props: RenderNotificationProps) => JSX.Element; | ||
| } & AppNotificationStyleProps; | ||
@@ -44,2 +44,5 @@ export declare type NotificationOptions = { | ||
| }; | ||
| export declare type RenderNotificationProps = NotificationOptions & { | ||
| close(): void; | ||
| }; | ||
| export declare type NotificationQueueItem = NotificationOptions & { | ||
@@ -46,0 +49,0 @@ animateOut: boolean; |
+2
-2
| { | ||
| "name": "react-native-app-notification", | ||
| "version": "1.5.2", | ||
| "version": "1.6.0", | ||
| "description": "In-app custom notifications for React-Native", | ||
@@ -9,3 +9,3 @@ "main": "dist/index.js", | ||
| "build": "tsc", | ||
| "deploy": "tsc && npm publish" | ||
| "deploy": "npm run build && npm publish" | ||
| }, | ||
@@ -12,0 +12,0 @@ "files": [ |
40521
0.5%744
0.54%