adopted-ember-addons / ember-cli-flash

Simple, highly configurable flash messages for ember-cli
https://www.npmjs.com/package/ember-cli-flash
MIT License
355 stars 113 forks source link

customize the Service defaults for (just) some of the message type's? #215

Open iirving opened 7 years ago

iirving commented 7 years ago

Is it possible to override the Service defaults for (just) some of the message type's?

what I would like to do is for type's [warning', 'danger', 'alert'] to set a much longer timeout and/or make them sticky, and do so globally in the config/environment.js, rather than on a message by message basis.

sbatson5 commented 7 years ago

You may be able to reopen the flash object and override timeout to be conditional. There are some examples of reopening objects on the Ember guides website: https://guides.emberjs.com/v2.10.0/object-model/reopening-classes-and-instances/