| 1 |
{% if settings.text is not empty %} |
| 2 |
{% set classes = settings.classes | merge( [ base_styles.base ] ) | join(' ') %} |
| 3 |
{% set id_attribute = settings._cssid is not empty ? 'id=' ~ settings._cssid | e('html_attr') : '' %} |
| 4 |
{% if settings.link.href %} |
| 5 |
<a |
| 6 |
href="{{ settings.link.href | raw }}" |
| 7 |
target="{{ settings.link.target }}" |
| 8 |
class="{{ classes }}" |
| 9 |
data-interaction-id="{{ id }}" |
| 10 |
data-interactions="{{ interactions | json_encode | e('html_attr') }}" |
| 11 |
{{ id_attribute }} {{ settings.attributes | raw }} |
| 12 |
> |
| 13 |
{{ settings.text }} |
| 14 |
</a> |
| 15 |
{% else %} |
| 16 |
<button class="{{ classes }}" data-interaction-id="{{ id }}" data-interactions="{{ interactions | json_encode | e('html_attr') }}" {{ id_attribute }} {{ settings.attributes | raw }}> |
| 17 |
{{ settings.text }} |
| 18 |
</button> |
| 19 |
{% endif %} |
| 20 |
{% endif %} |
| 21 |
|