mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-21 08:29:27 -04:00
does what it says on the tin, and is also consistent with prior art: https://components.publishing.service.gov.uk/component-guide/copy_to_clipboard
14 lines
555 B
HTML
14 lines
555 B
HTML
{% macro copy_to_clipboard(value, name, thing) %}
|
|
{% if name|lower == thing|lower %}
|
|
<h2 class="copy-to-clipboard__name">
|
|
{{ name }}
|
|
</h2>
|
|
{% endif %}
|
|
<div data-module="copy-to-clipboard" data-value="{{ value }}" data-thing="{{ thing }}" data-name="{{ name }}">
|
|
<span class="copy-to-clipboard__value">
|
|
{% if name|lower != thing|lower %}<span class="govuk-visually-hidden">{{ thing }}: </span>{% endif %}{{ value }}
|
|
</span>
|
|
<span class="copy-to-clipboard__notice" aria-live="assertive"></span>
|
|
</div>
|
|
{% endmacro %}
|