1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

[Button] Change classes and modifiers method

This commit is contained in:
Lucas Bigot
2024-03-29 11:13:45 -04:00
parent 0a4da30696
commit 375b54150e

View File

@@ -17,10 +17,18 @@
{% set _tag = 'span' %} {% set _tag = 'span' %}
{% endif %} {% endif %}
{% if _classes != null %}
{% set _classes = ' ' ~ _classes %}
{% endif %}
{% if _modifiers != null %}
{% set _classes = ' ' ~ _modifiers ~ ' ' ~ _classes %}
{% endif %}
{# ---------------------------------------- #} {# ---------------------------------------- #}
<{{ _tag }} <{{ _tag }}
class="c-button {{ _classes }} {{ _modifiers }}" class="c-button{{ _classes }}"
{% if _href %}href="{{ _href }}"{% endif %} {% if _href %}href="{{ _href }}"{% endif %}
{% if _external %}target="_blank" rel="noopener noreferrer" data-load="false"{% endif %} {% if _external %}target="_blank" rel="noopener noreferrer" data-load="false"{% endif %}
{% if _attr %}{{ _attr | raw }}{% endif %} {% if _attr %}{{ _attr | raw }}{% endif %}