Talor-A / react-native-message-bar

A notification bar alert displayed at the top of the screen for react-native
MIT License
55 stars 27 forks source link

Titlestyle and messageStyle is not applying #21

Closed mkayswork closed 6 years ago

mkayswork commented 6 years ago

Hi there,

first of all thank you for keeping the maintenance of this project! 👍

What I discovered is that the styling for the title and the message is not working properly. I am using this method call to have a white message and title, but still it's not working. I also tried not to provide any color since the default value is white.

Here's the method:

MessageBarManager.showAlert({ title: 'Teilen nicht möglich', message: 'Die zugehörige App ist nicht installiert!', alertType: 'info', stylesheetInfo: { backgroundColor: Constants.APP_COLOR, }, titleStyle: { color: '#fff' }, messageStyle: {color: '#fff', fontFamily: Constants.FONT_DEFAULT}, duration: 3000 })

Any idea what might be causing this issue?

Talor-A commented 6 years ago

thanks for reporting this. it looks like providing the stylesheetInfo prop causes the other styles to be overridden. as a workaround, can you do stylesheetInfo:{ backgroundColor:Constants.APP_COLOR, strokeColor: Constants.APP_COLOR, titleColor:'#fff', messageColor: '#fff'} ?

mkayswork commented 6 years ago

Thanks for the response. I made it work only using the prop stylesheetExtra without specifiying titleStyle or messageStyle.