juliancwirko / react-s-alert

Alerts / Notifications for React with rich configuration options
https://www.npmjs.com/package/react-s-alert
MIT License
649 stars 69 forks source link

Is it possible to pass component as a text value for error messaging? #73

Open AndrewMerke opened 6 years ago

AndrewMerke commented 6 years ago

Hello, I want to translate every alert to few different languages. My question, is it possible to pass component as a text value for error messaging?

Code for alert and translations, I am using:

  if(error.response.payload.error==='Unauthorized'){
        Alert.error(<FormattedMessage {...messages.unauthorizedMessage} />, {
          html: false,
        });