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-44.4.1 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-44.4.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-44.3.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-44.2.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-44.1.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-44.0.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-43.5.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-43.4.1 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-43.4.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-43.3.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-43.2.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-43.1.1 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-43.1.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-43.0.2 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-43.0.1 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-43.0.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-42.1.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-42.0.0 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-41.1.2 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb
govuk_publishing_components-41.1.1 app/views/govuk_publishing_components/components/_lead_paragraph.html.erb