juliancwirko / react-s-alert

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

Allow setting of contentTemplate in configObj #65

Open gustavlrsn opened 6 years ago

gustavlrsn commented 6 years ago

It would be neat if I were able to use different templates for different alerts, by setting the contentTemplate in the configObj, like this:

Alert.success('Alert message', {
    contentTemplate: AnotherTemplate,
});
samjhill commented 5 years ago

+1, I would love this

gustavlrsn commented 5 years ago

@samjhill what I did instead was pass along a variable in customFields that the template itself then uses to render different variants