Sha256: f8f8a7cbe7ed9303078d118f68ec6129f2d941f5f879300ce836f847dbc07044
Contents?: true
Size: 831 Bytes
Versions: 57
Compression:
Stored size: 831 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"> <%= 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
57 entries across 57 versions & 1 rubygems