{# Extra classes variable added to be sure that modifiers will appear after main classes #} {% set classes = [ 'toolbar-button', icon ? 'toolbar-button--icon--' ~ icon : '', extra_classes, ] %} <{{html_tag|default('button')}}{{ attributes.addClass(classes) }} data-index-text="{{ text|first|lower }}"> {% if avatar %} {{~ avatar ~}} {% endif %} {% if action %} {{ 'Extend'|t }} {% endif %} {% block content %} {% if text %} {{~ text ~}} {% endif %} {% endblock %} {# Element that improves sub-menu UX by implementing the Safe Triangle strategy. More info at https://www.smashingmagazine.com/2023/08/better-context-menus-safe-triangles #} {% if has_safe_triangle %}
{% endif %}