Sha256: f8cda74481005f6697de3c4a4f21281fc3c4236cf79c204e9fb24746f57f899d

Contents?: true

Size: 502 Bytes

Versions: 8

Compression:

Stored size: 502 Bytes

Contents

class Dvl::Components::Modal < Erector::Widget
  needs :title,
        id: nil,
        html_opts: {}

  def content
    div(@html_opts.merge(class: "modal #{@html_opts[:class]}", tabindex: '-1', id: @id)) {
      div.modal_dialog {
        div.modal_content {
          div.modal_header {
            a.close '&times;'.html_safe, 'data-dismiss' => 'modal'
            h3 @title.html_safe
          }

          modal_content
        }
      }
    }
  end

  def modal_content
    call_block
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dvl-core-0.0.12 lib/dvl/components/modal.rb
dvl-core-0.0.11 lib/dvl/components/modal.rb
dvl-core-0.0.10 lib/dvl/components/modal.rb
dvl-core-0.0.9 lib/dvl/components/modal.rb
dvl-core-0.0.8 lib/dvl/components/modal.rb
dvl-core-0.0.7 lib/dvl/components/modal.rb
dvl-core-0.0.6 lib/dvl/components/modal.rb
dvl-core-0.0.5 lib/dvl/components/modal.rb