templates/components/button-with-icon.html.twig line 1

Open in your IDE?
  1. {% set orderIsDefined = order is defined %}
  2. {% set linkIsDefined = link is defined %}
  3. {% set hasSvg = icon is defined %}
  4. {% if (linkIsDefined) %}
  5. <a href="{{ link.href|default('javascript:void(0)') }}" {{ attributes|default('') }} {% if link.external is defined and link.external %} target="_blank" {% endif %}>
  6. {% endif %}
  7.     <span class="button d-inline-flex align-items-center justify-content-center {{ order.text == '1' ? 'slide-to-right-icon' }} {{ disabled is defined ? 'disabled' : '' }} {{ color is defined ? color : 'darker-blue' }}" {{ attributes|default('')|raw }}>
  8.     {% if (orderIsDefined) %}
  9.         <span class="{{ 'order-%s'|format(order.text) }} {{ order.text == '1' ? 'me-2' : 'ms-2' }}">{{ text|default('Mehr erfahren') }}</span>
  10.         {% if (hasSvg and icon.svg is defined) %}
  11.             {{ icon.svg|raw }}
  12.         {% else %}
  13.             <i class="icon {{ order.text == '1' ? 'target-icon' }} {{ iconColor is defined ? iconColor : 'text-yellow' }} fa-solid {{ 'order-%s'|format(order.icon) }} {{ icon|default('fa-arrow-right') }}"></i>
  14.         {% endif %}
  15.     {% endif %}
  16.     </span>
  17. {% if (linkIsDefined) %}
  18. </a>
  19. {% endif %}