Sha256: b3f23d02512c8077b5a5a23299c32eca812d739fa1e5430c2564f76ced42670a

Contents?: true

Size: 567 Bytes

Versions: 103

Compression:

Stored size: 567 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]
  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

103 entries across 103 versions & 1 rubygems

Version Path
govuk_publishing_components-43.5.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-43.4.1 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-43.4.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-43.3.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-43.2.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-43.1.1 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-43.1.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-43.0.2 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-43.0.1 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-43.0.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-42.1.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-42.0.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-41.1.2 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-41.1.1 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-41.1.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-41.0.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-40.1.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-40.0.0 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-39.2.5 app/views/govuk_publishing_components/components/_inset_text.html.erb
govuk_publishing_components-39.2.4 app/views/govuk_publishing_components/components/_inset_text.html.erb