Sha256: 043d121716cb7183496ceb608d38c6d00f15b323ea7216c3580904f16e209036
Contents?: true
Size: 850 Bytes
Versions: 19
Compression:
Stored size: 850 Bytes
Contents
<% id ||= "character-count-#{SecureRandom.hex(4)}" maxlength ||= nil maxwords ||= nil threshold ||= nil textarea ||= {} %> <% if maxlength || maxwords %> <%= content_tag :div, class: "gem-c-character-count govuk-character-count", data: { module: "govuk-character-count", maxlength: maxlength, maxwords: maxwords, threshold: threshold } do %> <%= render "govuk_publishing_components/components/textarea", { id: id, character_count: true }.merge(textarea.symbolize_keys) %> <div id="<%= id %>-info" class="govuk-hint govuk-character-count__message" aria-live="polite"> <%= t("components.character_count.body", number: maxlength || maxwords, type: maxwords ? t("components.character_count.type.words") : t("components.character_count.type.characters")) %> </div> <% end %> <% end %>
Version data entries
19 entries across 19 versions & 1 rubygems