- Issue created by @just_like_good_vibes
This issue is a follow-up of issue 📌 [1.1.x] Adopts the new Icon API Active
Below some comments to be addressed.
---
this snippet is OK and repeated many times:
{% if icon.icon_id %}
{% set attributes = attributes.addClass([icon.icon_id ? 'fr-icon-' ~ icon.icon_id|clean_class, (icon.settings.size|default('md') != 'md') ? 'fr-icon--' ~ icon.settings.size|clean_class, icon.settings.color ? 'fr-text-' ~ icon.settings.color|clean_class]) %}
{% endif %}
{% set detail_end_attributes = detail_end_attributes.addClass(['fr-card__detail', detail_end_icon.icon_id ? 'fr-icon-' ~ detail_end_icon.icon_id|clean_class, (detail_end_icon.settings.size|default('md') != 'md') ? 'fr-icon--' ~ detail_end_icon.settings.size|clean_class]) %}
{% if not dismissible and icon.icon_id %}
{% set attributes = attributes.addClass([icon.icon_id ? 'fr-icon-' ~ icon.icon_id|clean_class, (icon.settings.size|default('md') != 'md') ? 'fr-icon--' ~ icon.settings.size|clean_class, icon.settings.color ? 'fr-text-' ~ icon.settings.color|clean_class]).addClass('fr-tag--icon-left') %}
{% endif %}
Let's see if we can make this more redable...
Active
1.1
Code