react-native-in-app-notification icon indicating copy to clipboard operation
react-native-in-app-notification copied to clipboard

Customize Notification Background

Open Rithie opened this issue 5 years ago • 6 comments

Hi, firstly, this lib is awesome eh. Great job! this is not a issue per say,

I'd like to understand how can I use background props. How can I customize the notification. I couldn't find any tutorial or documentation.

Rithie avatar Dec 07 '18 18:12 Rithie

Yes this library is awesome however how can the background Color be used

graig12 avatar Dec 08 '18 03:12 graig12

@Rithie did you manage to figure this one out?

graig12 avatar Dec 08 '18 14:12 graig12

Not sure if this is what you're looking for but you can write your own component and then give it to the library to display for you https://github.com/robcalcroft/react-native-in-app-notification#props see the notificationBodyComponent prop. Then you can give the component any background colour or design you like.

robcalcroft avatar Dec 09 '18 19:12 robcalcroft

Thanks I will try. One more question Is it possible to use a url for the Icon prop in this.prop.shownotification()?

graig12 avatar Dec 09 '18 21:12 graig12

Did someone know how to change the text color in the notification bar?

ZMChoo avatar Jan 29 '19 10:01 ZMChoo

@mun5865 - Once you've created your own notification component and referenced it in the <InAppNotificationProvider notificationBodyComponent={...}> provider, you can just change the color as you would with a simple styles component. The example component here is very useful to help you create your own

sa2812 avatar Nov 20 '19 21:11 sa2812