Sha256: 9038f00af900b8b22e7758f39381d9a5a2853f12fe40eb233ec534d55b4b27d3
Contents?: true
Size: 852 Bytes
Versions: 59
Compression:
Stored size: 852 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) %> <span 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")) %> </span> <% end %> <% end %>
Version data entries
59 entries across 59 versions & 1 rubygems