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
-
#ui_alert(content = nil, options = nil, html_options = nil, &block) ⇒ Object
Alert Component.
-
#ui_badge(content = nil, options = nil, html_options = nil, &block) ⇒ Object
Badge (Label) Component.
-
#ui_progress_bar(percentage = nil, options = nil, html_options = nil, &block) ⇒ Object
ProgressBar Component.
-
#ui_spinner(content = nil, options = nil, html_options = nil, &block) ⇒ Object
Spinner Component.
-
#ui_toast(content = nil, options = nil, html_options = nil, &block) ⇒ Object
Toast Component.
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, = nil, = nil, &block) if tapped?(block) UiBibz::Ui::Core::Notifications::Alert.new(content, , ).tap(&block).render else UiBibz::Ui::Core::Notifications::Alert.new(content, , , &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, = nil, = nil, &block) UiBibz::Ui::Core::Notifications::Badge.new(content, , , &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 (percentage = nil, = nil, = nil, &block) if tapped?(block) UiBibz::Ui::Core::Notifications::ProgressBar.new(percentage, , ).tap(&block).render else UiBibz::Ui::Core::Notifications::ProgressBar.new(percentage, , , &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, = nil, = nil, &block) UiBibz::Ui::Core::Notifications::Spinner.new(content, , , &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, = nil, = nil, &block) if tapped?(block) UiBibz::Ui::Core::Notifications::Toast.new(content, , ).tap(&block).render else UiBibz::Ui::Core::Notifications::Toast.new(content, , , &block).render end end |