Sha256: 582952cff0d4fb5d4c27318cd054606b418c4a0bfec55d279a18157c80f9c07a

Contents?: true

Size: 590 Bytes

Versions: 19

Compression:

Stored size: 590 Bytes

Contents

<%
  add_gem_component_stylesheet("inset-text")

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

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

  classes = %w[gem-c-inset-text govuk-inset-text gem-print-links-within]
  classes << shared_helper.get_margin_top
  classes << shared_helper.get_margin_bottom
%>
<%= tag.div id: id, class: classes do %>
  <% if defined? text %>
    <%= text %>
  <% elsif block_given? %>
    <%= yield %>
  <% end %>
<% end %>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
govuk_publishing_components-45.2.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-45.1.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-45.0.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.11.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.10.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.9.1 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.9.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.8.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.7.1 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.7.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.6.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.5.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.4.2 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.4.1 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.4.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.3.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.2.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.1.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-44.0.0 app/views/govuk_publishing_components/components/_inset_text.html.erb