You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would there be any interest in moving the current flash logic from the flash-message component, into a modifier?
Thinking it could be (somewhat) backwards compatible, the current flash-message component would end up looking like this;
// flash-message.hbs
<div
...attributes
{{flash-modifier @flash}} // applies all the classes, attributes, event handlers, flash logic. The component JS would be mostly empty.
>
{{#ifhasBlock}}{{yieldthis @flash (action"onClose")}}{{else}}{{@flash.message}}
<FlashMessage::Progress @showProgress={{this.showProgressBar}} @duration={{this.progressDuration}} />
{{/if}}
</div>
It would also allow users of this addon to make custom flash components with relative ease if they wish to do so, without having to implement all of the logic from the flash message component.
{{#eachflashMessages.queueas |flash|}}
<my-flashclass="abc"{{flash-modifierflash}}>
wow, that's all I have to do, don't even need a component
</my-flash>
{{/each}}
The text was updated successfully, but these errors were encountered:
Would there be any interest in moving the current flash logic from the flash-message component, into a modifier?
Thinking it could be (somewhat) backwards compatible, the current flash-message component would end up looking like this;
It would also allow users of this addon to make custom flash components with relative ease if they wish to do so, without having to implement all of the logic from the flash message component.
The text was updated successfully, but these errors were encountered: