Module: UiBibz::Helpers::Ui::Core::NotificationsHelper

Included in:
UiBibz::Helpers::Ui::CoreHelper
Defined in:
lib/ui_bibz/helpers/ui/core/notifications_helper.rb

Instance Method Summary collapse

Instance Method Details

#ui_alert(content = nil, options = nil, html_options = nil, &block) ⇒ Object

Alert Component

options (Hash) html_options (Hash)



9
10
11
12
13
14
15
# File 'lib/ui_bibz/helpers/ui/core/notifications_helper.rb', line 9

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

#ui_badge(content = nil, options = nil, html_options = nil, &block) ⇒ Object

Badge (Label) Component

options (Hash) html_options (Hash)



22
23
24
# File 'lib/ui_bibz/helpers/ui/core/notifications_helper.rb', line 22

def ui_badge(content = nil, options = nil, html_options = nil, &block)
  UiBibz::Ui::Core::Notifications::Badge.new(content, options, html_options, &block).render
end

#ui_progress_bar(percentage = nil, options = nil, html_options = nil, &block) ⇒ Object

ProgressBar Component

options (Hash) html_options (Hash)



30
31
32
33
34
35
36
# File 'lib/ui_bibz/helpers/ui/core/notifications_helper.rb', line 30

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

#ui_spinner(content = nil, options = nil, html_options = nil, &block) ⇒ Object

Spinner Component

options (Hash) html_options (Hash)



55
56
57
# File 'lib/ui_bibz/helpers/ui/core/notifications_helper.rb', line 55

def ui_spinner(content = nil, options = nil, html_options = nil, &block)
  UiBibz::Ui::Core::Notifications::Spinner.new(content, options, html_options, &block).render
end

#ui_toast(content = nil, options = nil, html_options = nil, &block) ⇒ Object

Toast Component

options (Hash) html_options (Hash)



42
43
44
45
46
47
48
# File 'lib/ui_bibz/helpers/ui/core/notifications_helper.rb', line 42

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