Sha256: 9f1a3bac8b5ec47ab81b62c9ec3dfcac00183827d6ec060391cf76e56b90c612

Contents?: true

Size: 1023 Bytes

Versions: 48

Compression:

Stored size: 1023 Bytes

Contents

<%
  add_gem_component_stylesheet("modal-dialogue")

  id ||= "modal-dialogue-#{SecureRandom.hex(4)}"
  wide ||= false
  data_attributes = {}
  aria_label ||= nil
  dialog_classes = ["gem-c-modal-dialogue__box"]
  dialog_classes << "gem-c-modal-dialogue__box--wide" if wide
%>

<%= tag.div class: "gem-c-modal-dialogue", data: { module: "modal-dialogue" }, id: id do %>
  <%= tag.div class: "gem-c-modal-dialogue__overlay" %>
  <%= tag.dialog class: dialog_classes, data: data_attributes, aria: { modal: true, label: aria_label }, role: "dialog", tabindex: 0 do %>
    <%= tag.div class: "gem-c-modal-dialogue__header" do %>
      <%= render "govuk_publishing_components/components/govuk_logo/govuk_logo_crown_only", {
        classes: %w[gem-c-modal-dialogue__logotype-crown],
      } %>
    <% end %>
    <%= tag.div yield, class: "gem-c-modal-dialogue__content" %>
    <%= tag.button "×", class: "gem-c-modal-dialogue__close-button", aria: { label: t("components.modal_dialogue.close_modal") } %>
  <% end %>
<% end %>

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
govuk_publishing_components-48.0.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-47.0.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-46.4.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-46.3.1 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-46.3.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-46.2.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-46.1.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-46.0.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.10.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.9.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.8.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.7.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.6.1 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.6.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.5.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.4.1 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.4.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.3.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.2.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb
govuk_publishing_components-45.1.0 app/views/govuk_publishing_components/components/_modal_dialogue.html.erb