Sha256: 85f2990218a3c836fa1a008fda0e4dedb2fcdf67879695aab38fbaf210cac7e3
Contents?: true
Size: 741 Bytes
Versions: 39
Compression:
Stored size: 741 Bytes
Contents
module ToastHelper def toast_notice(text) toast_for('success', 'check-circle', text) end def toast_alert(text) toast_for('error', 'times-circle', text) end def toast_info(text) toast_for('info', 'info-circle', text) end private def toast_for(type, icon, text) "<div class='toast mu-toast-#{type}' role='alert'> <div class='toast-body'> <div class='d-flex align-items-center'> #{fa_icon icon, class: 'fa-lg me-3'} <span class='flex-grow-1 text-break'>#{text}</span> <button type='button' class='btn-close btn-close-white mx-2 flex-shrink-0' data-bs-dismiss='toast' aria-label='Close'></button> </div> </div> </div>".html_safe end end
Version data entries
39 entries across 39 versions & 1 rubygems