Sha256: 84bfdf38c4d582f4033eb8ed67801f00b6be1fe2b263bdebceb9ab50870bb4e0

Contents?: true

Size: 1.06 KB

Versions: 53

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

module UiBibz::Ui::Core::Notifications::Components
  # Create a alert body
  #
  # ==== Attributes
  #
  # * +content+ - Content of element
  # * +options+ - Options of element
  # * +html_options+ - Html Options of element
  #
  # ==== Options
  #
  # You can add HTML attributes using the +html_options+.
  # You can pass arguments in options attribute:
  #
  # ==== Signatures
  #
  #   UiBibz::Ui::Core::Notifications::AlertBody.new(content, options = nil, html_options = nil)
  #
  #   UiBibz::Ui::Core::Notifications::AlertBody.new(options = nil, html_options = nil) do
  #     content
  #   end
  #
  # ==== Examples
  #
  #   UiBibz::Ui::Core::Notifications::AlertBody.new.render
  #
  #   UiBibz::Ui::Core::Notifications::AlertBody.new do
  #     'Exemple'
  #   end.render
  #
  class AlertBody < UiBibz::Ui::Core::Component
    # See UiBibz::Ui::Core::Component.initialize

    def pre_render
      tag(:hr) + content_tag(:p, content, html_options)
    end

    private

    def component_html_classes
      'alert-body mb-0'
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
ui_bibz-3.0.4 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.3 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.2 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.1 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta19 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta18 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta17 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta16 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta15 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta14 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta13 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta12 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta11 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta10 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta9 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta8 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta7 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta6 lib/ui_bibz/ui/core/notifications/components/alert_body.rb
ui_bibz-3.0.0.beta5 lib/ui_bibz/ui/core/notifications/components/alert_body.rb