Sha256: 2333433e991b32519051907e71f0a6c14b693ea4e5f049177bc5553f7993b403
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
Contents
module FlashRailsMessages class Base # ZURB FOUNDATION FRAMEWORK # ========================================= # def alert_element(type, message) # content_tag :div, alert_options(type) do # content = ActiveSupport::SafeBuffer.new # content += close_element if options.fetch(:dismissible, false) # content += message.html_safe # content # end # end def close_element content_tag :button, type: 'button', class: 'close-button', 'data-close': '' do content_tag(:span, '×'.html_safe, 'aria-hidden': 'true') end end def default_alert_options options.fetch(:dismissible, false) ? { 'data-closable': '' } : {} end def default_alert_classes 'callout' end def alert_type_classes { success: 'success', notice: 'success', alert: 'alert', error: 'alert', } end # def custom_alert_classes # Add custom alert classes as a string # end end end
Version data entries
3 entries across 3 versions & 1 rubygems