Sha256: fce066fbc0d98cbfe20baba37f9cecec58919519b1477516d2124d591563e079
Contents?: true
Size: 1.16 KB
Versions: 6
Compression:
Stored size: 1.16 KB
Contents
<% add_gem_component_stylesheet("modal-dialogue") id ||= "modal-dialogue-#{SecureRandom.hex(4)}" wide ||= false aria_label ||= nil dialog_classes = ["gem-c-modal-dialogue__box"] dialog_classes << "gem-c-modal-dialogue__box--wide" if wide component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns) component_helper.add_class("gem-c-modal-dialogue") component_helper.add_data_attribute({ module: "modal-dialogue" }) component_helper.set_id(id) %> <%= tag.div(**component_helper.all_attributes) do %> <%= tag.div class: "gem-c-modal-dialogue__overlay" %> <%= tag.dialog class: dialog_classes, 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
6 entries across 6 versions & 1 rubygems