You are here

commerce-cart-blocks-cart-button.html.twig in Commerce Cart Blocks 8

{%
set classes = [
  'commerce-cart-block',
  'commerce-cart-block--type-button',
  in_cart ? 'is-inCart',
]
%}

<div{{ attributes.addClass(classes) }}>
  <div class="commerce-cart-block--summary">
    <a class="commerce-cart-block--link{{ content ? " commerce-cart-block--link__expand" }}" href="{{ url }}">
      <span class="commerce-cart-block--summary__icon">{{ icon }}</span>
      <span class="commerce-cart-block--summary__label">{{ button_label }}</span>
    </a>
  </div>

  {% if content %}
  <div class="commerce-cart-block--contents">
    <div class="commerce-cart-block--contents__inner">
      {{ content }}
    </div>
  </div>
  {% endif %}
</div>

File

templates/commerce-cart-blocks-cart-button.html.twig
View source
  1. {%
  2. set classes = [
  3. 'commerce-cart-block',
  4. 'commerce-cart-block--type-button',
  5. in_cart ? 'is-inCart',
  6. ]
  7. %}
  8. <div{{ attributes.addClass(classes) }}>
  9. <div class="commerce-cart-block--summary">
  10. <a class="commerce-cart-block--link{{ content ? " commerce-cart-block--link__expand" }}" href="{{ url }}">
  11. <span class="commerce-cart-block--summary__icon">{{ icon }}</span>
  12. <span class="commerce-cart-block--summary__label">{{ button_label }}</span>
  13. </a>
  14. </div>
  15. {% if content %}
  16. <div class="commerce-cart-block--contents">
  17. <div class="commerce-cart-block--contents__inner">
  18. {{ content }}
  19. </div>
  20. </div>
  21. {% endif %}
  22. </div>