Sha256: 04098cd0851a98f6523e27f30c1c69a8825da959eb0124dfa65960daf5fbadb7

Contents?: true

Size: 305 Bytes

Versions: 7

Compression:

Stored size: 305 Bytes

Contents

<%
  id ||= "hint-#{SecureRandom.hex(4)}"
  margin_bottom ||= 3

  css_classes = %w( gem-c-hint govuk-hint )
  css_classes << ([*0..9].include?(margin_bottom) ? "govuk-!-margin-bottom-#{margin_bottom}" : "govuk-!-margin-bottom-3")
%>

<%= tag.span id: id, class: css_classes do %>
  <%= text %>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
govuk_publishing_components-16.1.0 app/views/govuk_publishing_components/components/_hint.html.erb
govuk_publishing_components-16.0.0 app/views/govuk_publishing_components/components/_hint.html.erb
govuk_publishing_components-15.3.0 app/views/govuk_publishing_components/components/_hint.html.erb
govuk_publishing_components-15.2.0 app/views/govuk_publishing_components/components/_hint.html.erb
govuk_publishing_components-15.1.0 app/views/govuk_publishing_components/components/_hint.html.erb
govuk_publishing_components-15.0.0 app/views/govuk_publishing_components/components/_hint.html.erb
govuk_publishing_components-14.0.0 app/views/govuk_publishing_components/components/_hint.html.erb