Creating messages in JavaScript
// Error:
require(['ui/feedback'], function(feedback){
feedback().error('An error message');
});
// Warning:
require(['ui/feedback'], function(feedback){
feedback().warning('This is not good at all');
});
Message Types
Warning
Something might happen
<div class="feedback-warning">
Something might happen
</div>
Error
Something just happened, calm down!
<div class="feedback-error">
Something just happened, calm down!
</div>
Info
We have no idea what it is but we are working on it anyway
<div class="feedback-info">
We have no idea what is but we are working on it anyway
</div>
Success
Everything fine again
<div class="feedback-success">
Everything fine again
</div>
Smaller feedback bars
Adding the class .small
will create feedback messages that are less high. For the meaning of the class .col-3
see the chapter about grids.
Warning
Error
Success
Info
<div class="feedback-warning small col-3">
Warning
</div>
<div class="feedback-error small col-3">
Error
</div>
<div class="feedback-success small col-3">
Success
</div>
<div class="feedback-info small col-3">
Info
</div>