Sha256: fe2f3b5948011ebf06ba5a75d9c7938453bda0eb402f0bbfa346410e8ffe3db1

Contents?: true

Size: 1.06 KB

Versions: 29

Compression:

Stored size: 1.06 KB

Contents

<% if render_as_modal? %>
  <%= turbo_frame_tag coco_modal_frame_id(name), class: "modal-frame" do %>
    <%= render component_tag(
      id: id,
      role: "dialog",
      aria: {modal: "true"},
      data: {turbo_temporary: true},
      x: {
        data: x_data("modal"),
        bind: "root",
        cloak: true,
        "@modal:visit": "modal.visit($event.detail.url)"
      },
    ) do %>
      <div class="modal-overlay" x-bind="overlay"></div>
      <div class="modal-container" x-bind="container" x-ref="container">
        <div class="modal-content" x-trap.noscroll.inert.noreturn="open">
          <%= modal_content %>
        </div>
      </div>
    <% end %>
    <%= render_flash_messages %>
  <% end %>
<% else %>
  <div data-role="inline-modal-content">
    <% if container_type == :dialog %>
      <%= render Coco::ModalDialog.new(id: @container_id, title: title.to_s, dismissable: false) do %>
        <%= content %>
      <% end %>
    <% else %>
      <%= coco_panel(id: @container_id) do %>
        <%= content %>
      <% end %>
    <% end %>
  </div>
<% end %>

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
coveragebook_components-0.19.4 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.19.3 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.19.2 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.19.1 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.19.0 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.18.8 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.18.7 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.18.0 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.17.7 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.17.6 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.17.5 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.17.4 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.17.3 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.17.2 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.17.1 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.17.0 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.16.0 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.15.0 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.14.0 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.13.1 app/components/coco/modals/modal/modal.html.erb