Sha256: a37a6c219479590c38a8839429e4d334c809874dda81177126e563a46bde98a9
Contents?: true
Size: 1.11 KB
Versions: 278
Compression:
Stored size: 1.11 KB
Contents
<% id ||= "warning-text-#{SecureRandom.hex(4)}" text_assistive ||= 'Warning' text_icon ||= '!' large_font ||= false highlight_text ||= false heading_level ||= 0 shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) text_classes = %w(govuk-warning-text__text) text_classes << "gem-c-warning-text__text--no-indent" if text_icon.empty? text_classes << "gem-c-warning-text__text--large" if large_font text_classes << "gem-c-warning-text__text--highlight" if highlight_text %> <%= tag.div id: id, class: "gem-c-warning-text govuk-warning-text" do %> <% unless text_icon.empty? %> <%= tag.span text_icon, class: "govuk-warning-text__icon", "aria-hidden": "true" %> <% end %> <% inner_text = capture do %> <%= tag.span text_assistive, class: "govuk-warning-text__assistive" %> <%= text %> <% end %> <% if heading_level > 0 %> <%= content_tag(shared_helper.get_heading_level, class: text_classes) do %> <%= inner_text %> <% end %> <% else %> <%= tag.strong class: text_classes do %> <%= inner_text %> <% end %> <% end %> <% end %>
Version data entries
278 entries across 278 versions & 1 rubygems