Sha256: 88f37d7cfcf55a36e5ed490d2d723b2d5bc266be2daaa6e730e68955650c05a6

Contents?: true

Size: 834 Bytes

Versions: 6

Compression:

Stored size: 834 Bytes

Contents

<%
  description ||= nil
  title_id ||= "govuk-notification-banner-title-#{SecureRandom.hex(4)}"
%>

<%= tag.div class: "gem-c-success-alert govuk-notification-banner govuk-notification-banner--success",
  role: "alert",
  tabindex: "-1",
  aria: {
    labelledby: title_id,
  },
  data: {
    module: "initial-focus",
  } do %>
  <div class="govuk-notification-banner__header">
    <%= tag.h2 t("govuk_component.success_alert.success", default: "Success"), class: "govuk-notification-banner__title", id: title_id %>
  </div>
  <div class="govuk-notification-banner__content">
    <% if description.present? %>
      <%= tag.h3 message, class: "govuk-notification-banner__heading" %>
      <%= description %>
    <% else %>
      <%= tag.p message, class: "govuk-body gem-c-success-alert__message" %>
    <% end %>
  </div>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
govuk_publishing_components-24.10.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-24.9.4 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-24.9.3 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-24.9.2 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-24.9.1 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-24.9.0 app/views/govuk_publishing_components/components/_success_alert.html.erb