Files
notifications-admin/app/templates/components/uk_components/error-message/template.njk
2023-06-16 14:55:24 -04:00

7 lines
479 B
Plaintext

{% set visuallyHiddenText = params.visuallyHiddenText | default("Error") -%}
<span {%- if params.id %} id="{{ params.id }}"{% endif %} class="usa-error-message{%- if params.classes %} {{ params.classes }}{% endif %}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
{% if visuallyHiddenText %}<span class="usa-sr-only">{{ visuallyHiddenText }}:</span> {% endif -%}
{{ params.html | safe if params.html else params.text }}
</span>