Sha256: 7b58d61f8320faa10f60403e4053f559e58da9b47fd094076177259234276c2e

Contents?: true

Size: 998 Bytes

Versions: 87

Compression:

Stored size: 998 Bytes

Contents

<%
  description ||= nil
  title_id ||= "govuk-notification-banner-title-#{SecureRandom.hex(4)}"
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
  classes = %w(gem-c-success-alert govuk-notification-banner govuk-notification-banner--success)
  classes << shared_helper.get_margin_bottom if local_assigns[:margin_bottom]
%>

<%= tag.div class: classes,
  role: "alert",
  tabindex: "-1",
  aria: {
    labelledby: title_id,
  },
  data: {
    module: "initial-focus",
  } do %>
  <div class="govuk-notification-banner__header">
    <%= tag.h2 t("components.success_alert.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

87 entries across 87 versions & 1 rubygems

Version Path
govuk_publishing_components-34.12.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.11.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.10.1 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.10.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.9.1 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.9.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.8.1 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.8.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.7.1 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.7.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.6.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.5.1 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.5.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.4.2 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.4.1 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.4.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.3.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.2.0 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.1.3 app/views/govuk_publishing_components/components/_success_alert.html.erb
govuk_publishing_components-34.1.2 app/views/govuk_publishing_components/components/_success_alert.html.erb