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:
@@ -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 %}
|
||||||
|
|||||||
Reference in New Issue
Block a user