Sha256: 5df459ba21181dc780833efaffa92b9c5c17cb5ba7d13800474b358b9825659a

Contents?: true

Size: 571 Bytes

Versions: 3

Compression:

Stored size: 571 Bytes

Contents

<%
  if local_assigns[:html].present? || local_assigns[:text].present?
    label_attributes = {
      class: class_names("govuk-label", local_assigns[:classes])
    }.merge!(local_assigns[:attributes] || {})
    label_attributes[:for] = local_assigns[:for] if local_assigns[:for].present?
    label_html = capture do
      tag.label (local_assigns[:html].presence || local_assigns[:text]), **label_attributes
    end
  end
%>
<% if local_assigns[:isPageHeading] %>
  <h1 class="govuk-label-wrapper">
    <%= label_html %>
  </h1>
<% else %>
  <%= label_html %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
govuk-design-system-rails-0.10.3 app/views/components/_govuk_label.html.erb
govuk-design-system-rails-0.10.2 app/views/components/_govuk_label.html.erb
govuk-design-system-rails-0.10.1 app/views/components/_govuk_label.html.erb