badge.twig
Same filename in other branches
<div{{ attributes.addClass('umami-badge') }}> <div class="umami-badge__container"> {% if icon %} <div class="umami-badge__icon"> {{ source(componentMetadata.path ~ '/icons/' ~ icon|default('knife') ~ '.svg') }} </div> {% endif %} {% if block('label') is defined and block('label')|trim %} <div class="umami-badge__label">{% block label %}{% endblock %}</div> {% endif %} {% block text %}{% endblock %} </div> </div>
File
-
core/
profiles/ demo_umami/ themes/ umami/ components/ badge/ badge.twig
View source
- <div{{ attributes.addClass('umami-badge') }}>
- <div class="umami-badge__container">
- {% if icon %}
- <div class="umami-badge__icon">
- {{ source(componentMetadata.path ~ '/icons/' ~ icon|default('knife') ~ '.svg') }}
- </div>
- {% endif %}
- {% if block('label') is defined and block('label')|trim %}
- <div class="umami-badge__label">{% block label %}{% endblock %}</div>
- {% endif %}
- {% block text %}{% endblock %}
- </div>
- </div>
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.