robcalcroft / react-native-in-app-notification

:bell: Customisable in-app notification component for React Native
MIT License
269 stars 78 forks source link

Icon example usage #9

Closed craig8two closed 6 years ago

craig8two commented 6 years ago

Hey there,

I am trying to pass an icon through but cant get it to display, here is a snippet of my code:

{this.notification && this.notification.show({ title: 'Notification (Tap to close)', message: 'Hello World', icon: 'http://www.icon100.com/up/3708/128/630.png', onPress: () => this.notification.closeNotification() })}

What am I doing wrong?

craig8two commented 6 years ago

Instead of passing just the path you need to pass an object like so:

icon: {uri: 'https://freeiconshop.com/wp-content/uploads/edd/notification-flat.png'},