Sha256: 084f11627be5375d0820a40c29706e18aa3fe91671e56dff7c050a81dd091074

Contents?: true

Size: 719 Bytes

Versions: 5

Compression:

Stored size: 719 Bytes

Contents

<%
  add_gem_component_stylesheet("inset-text")

  id ||= "inset-text-#{SecureRandom.hex(4)}"
  margin_top ||= 6
  local_assigns[:margin_bottom] ||= 6

  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new({
    margin_top: margin_top,
  })

  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
  component_helper.add_class("gem-c-inset-text govuk-inset-text gem-c-force-print-link-styles-within")
  component_helper.add_class(shared_helper.get_margin_top)
  component_helper.set_id(id)
%>
<%= tag.div(**component_helper.all_attributes) do %>
  <% if defined? text %>
    <%= text %>
  <% elsif block_given? %>
    <%= yield %>
  <% end %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
govuk_publishing_components-49.1.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-49.0.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-48.0.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-47.0.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-46.4.0 app/views/govuk_publishing_components/components/_inset_text.html.erb