templates/default/components/molecules/icon-link/icon-link.html.twig line 1

Open in your IDE?
  1. <{{ elementTag|default('a') }}{% if href is defined %} href="{{ href }}"{% endif %} class="icon-link{% if iconSrc|default is empty %} icon-link--no-icon{% endif %} {{ class|default }}" {{ attributes|default([])|getAttributes }}>
  2. {% block icon %}
  3. {% if iconSrc is defined and iconSrc is not empty %}
  4. {% include 'components/atoms/image/image.html.twig' with {
  5. 'src': iconSrc,
  6. 'lazyload': lazyload ?? true,
  7. 'class': 'icon-link__icon',
  8. 'objectFit': objectFit|default,
  9. 'width': width|default,
  10. 'height': height|default
  11. } %}
  12. {% endif %}
  13. {% endblock %}
  14. {% block linkText %}
  15. {{ text|default|raw }}
  16. {% endblock %}
  17. </{{ elementTag|default('a') }}>