Sha256: 28acecdac404aabf125d1282f2fefe7cad45af03f8f0636d90724eae00fac44c
Contents?: true
Size: 1.82 KB
Versions: 13
Compression:
Stored size: 1.82 KB
Contents
# frozen_string_literal: true module UiBibz::Helpers::Ui::Core::NotificationsHelper # Alert Component # # +options+ (Hash) # +html_options+ (Hash) # def ui_alert(content = nil, options = nil, html_options = nil, &block) if tapped?(block) UiBibz::Ui::Core::Notifications::Alert.new(content, options, html_options).tap(&block).render else UiBibz::Ui::Core::Notifications::Alert.new(content, options, html_options, &block).render end end # Badge (Label) Component # # +options+ (Hash) # +html_options+ (Hash) # def ui_badge(content = nil, options = nil, html_options = nil, &) UiBibz::Ui::Core::Notifications::Badge.new(content, options, html_options, &).render end # ProgressBar Component # # +options+ (Hash) # +html_options+ (Hash) def ui_progress_bar(percentage = nil, options = nil, html_options = nil, &block) if tapped?(block) UiBibz::Ui::Core::Notifications::ProgressBar.new(percentage, options, html_options).tap(&block).render else UiBibz::Ui::Core::Notifications::ProgressBar.new(percentage, options, html_options, &block).render end end # Toast Component # # +options+ (Hash) # +html_options+ (Hash) def ui_toast(content = nil, options = nil, html_options = nil, &block) if tapped?(block) UiBibz::Ui::Core::Notifications::Toast.new(content, options, html_options).tap(&block).render else UiBibz::Ui::Core::Notifications::Toast.new(content, options, html_options, &block).render end end # Spinner Component # # +options+ (Hash) # +html_options+ (Hash) # def ui_spinner(content = nil, options = nil, html_options = nil, &) UiBibz::Ui::Core::Notifications::Spinner.new(content, options, html_options, &).render end private def tapped?(block) UiBibz::Utils::Screwdriver.tapped?(block) end end
Version data entries
13 entries across 13 versions & 1 rubygems