Skip to content

Commit 4bb643e

Browse files
VitaliiK91robcalcroft
authored andcommitted
fix readme
1 parent 1a7fd5e commit 4bb643e

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,16 @@ For Android you need to add the `VIBRATE` permission to your app `AndroidManifes
7171

7272
The notification body is what is rendered inside the main Notification component and gives you the ability to customise how the notification looks. You can use the default notification body component in `./DefaultNotificationBody.js` as inspiration and guidance.
7373

74-
Your `notificationBodyComponent` component is given four props:
74+
Your `notificationBodyComponent` component is given five props:
7575

76-
| Prop Name | Prop Description | Data Type | Default |
77-
| --------- | ------------------------------------------------------------- | ------------------- | ------- |
78-
| title | The title passed to `NotificationRef.show` | String | `''` |
79-
| message | The message passed to `NotificationRef.show` | String | `''` |
80-
| onPress | The callback passed to `NotificationRef.show` | Function | `null` |
81-
| icon | Icon for notification passed to `NotificationRef.show` | ImageSourcePropType | `null` |
82-
| vibrate | Vibrate on show notification passed to `NotificationRef.show` | Boolean | `true` |
76+
| Prop Name | Prop Description | Data Type | Default |
77+
| ----------------- | ------------------------------------------------------------- | ------------------- | ------- |
78+
| title | The title passed to `NotificationRef.show` | String | `''` |
79+
| message | The message passed to `NotificationRef.show` | String | `''` |
80+
| onPress | The callback passed to `NotificationRef.show` | Function | `null` |
81+
| icon | Icon for notification passed to `NotificationRef.show` | ImageSourcePropType | `null` |
82+
| vibrate | Vibrate on show notification passed to `NotificationRef.show` | Boolean | `true` |
83+
| additionalProps | Any additional props passed to `NotificationBodyComponent` | Object | `null` |
8384

8485
## Usage
8586

@@ -132,8 +133,8 @@ class MyApp extends Component {
132133
this.props.showNotification({
133134
title: 'You pressed it!',
134135
message: 'The notification has been triggered',
135-
onPress: () => Alert.alert('Alert', 'You clicked the notification!')
136-
additionalProps={{ type: 'error' }}
136+
onPress: () => Alert.alert('Alert', 'You clicked the notification!'),
137+
additionalProps: { type: 'error' },
137138
});
138139
}}
139140
>

src/DefaultNotificationBody/index.android.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ DefaultNotificationBody.propTypes = {
107107
onClose: PropTypes.func,
108108
iconApp: Image.propTypes.source,
109109
icon: Image.propTypes.source,
110+
additionalProps: PropTypes.object,
110111
};
111112

112113
DefaultNotificationBody.defaultProps = {
@@ -118,6 +119,7 @@ DefaultNotificationBody.defaultProps = {
118119
icon: null,
119120
onPress: () => null,
120121
onClose: () => null,
122+
additionalProps: null,
121123
};
122124

123125
export default DefaultNotificationBody;

0 commit comments

Comments
 (0)