<a class="btn btn-primary" data-toast-type="warning" data-toast-text="Hi! I'm warning message.">warning message</a>

Alerts

Based on the version from MDB (https://mdbootstrap.com/javascript/alerts/)

Using the alerts element in HTML

To make the alerts work proper we need to initialize them:

<script>
    $('[data-toast-type]').click(function () {
        toastr[$(this).data('toast-type')]($(this).data('toast-text'))
    });
</script>