clone of github.com/decent-newsroom/newsroom
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
581 B

{#
Toast Notification Component
Include this once in your layout to enable toast notifications throughout your app.
Usage:
{% include 'components/Toast.html.twig' %}
Then from JavaScript:
window.showToast('Success!', 'success');
window.showToast('Error occurred', 'danger');
window.showToast('Processing...', 'info');
window.showToast('Warning!', 'warning');
#}
<div {{ stimulus_controller('utility--toast') }} class="toast-container" data-utility--toast-target="container">
{# Toast messages will be dynamically inserted here #}
</div>