Sha256: 8e788ac2182a444595c07e7585e25fdc36c4436f16b8d0d191074f3b39edf157

Contents?: true

Size: 1.22 KB

Versions: 4

Compression:

Stored size: 1.22 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 %>
    <% elsif container_type == :canvas %>
      <%= render Coco::ModalCanvas.new(id: @container_id, dismissable: false) do %>
        <%= content %>
      <% end %>
    <% else %>
      <%= coco_panel(id: @container_id) do %>
        <%= content %>
      <% end %>
    <% end %>
  </div>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
coveragebook_components-0.19.8 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.19.7 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.19.6 app/components/coco/modals/modal/modal.html.erb
coveragebook_components-0.19.5 app/components/coco/modals/modal/modal.html.erb