Sha256: 47c555d7b277e129e78f1df312c41349363d0671bdaedaf83c6a0e26474fd513

Contents?: true

Size: 541 Bytes

Versions: 129

Compression:

Stored size: 541 Bytes

Contents

<%
  add_gem_component_stylesheet("lead-paragraph")

  text ||= ""
  inverse ||= false
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)

  custom_margin_bottom_class =  shared_helper.get_margin_bottom if [*0..9].include?(local_assigns[:margin_bottom])

  classes = %w(gem-c-lead-paragraph)
  classes << "gem-c-lead-paragraph--inverse" if inverse
  classes << custom_margin_bottom_class if local_assigns[:margin_bottom]
%>
<% if text.present? %>
  <%= content_tag :p, text, class: classes %>
<% end %>

Version data entries

129 entries across 129 versions & 1 rubygems

Version Path
govuk_publishing_components-36.0.3 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-36.0.2 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-36.0.1 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-36.0.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.23.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.22.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.21.4 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.21.3 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.21.2 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.21.1 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.21.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.20.1 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.20.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.19.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.18.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.17.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.16.1 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.16.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.15.5 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-35.15.4 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb