From 0b669c7131b2df1f5fad148c1896370b717e20b4 Mon Sep 17 00:00:00 2001 From: rmccar <42928680+rmccar@users.noreply.github.com> Date: Fri, 27 Sep 2024 11:30:55 +0100 Subject: [PATCH] Remove button variant class when no variant set (#3372) --- src/components/button/_macro.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/button/_macro.njk b/src/components/button/_macro.njk index ba06e0abfc..0b48a1f0ae 100644 --- a/src/components/button/_macro.njk +++ b/src/components/button/_macro.njk @@ -72,7 +72,7 @@ {% else %} type="{{ buttonType }}" {% endif %} - class="ons-btn{{ ' ' + params.classes if params.classes else '' }}{% if params.variants and params.variants is not string %}{% for variant in params.variants %}{{ ' ' }}ons-btn--{{ variant }}{% endfor %}{% else %}{{ ' ' }}ons-btn--{{ params.variants }}{% endif %}{{ ' ons-btn--link ons-js-submit-btn' if params.url }}{{ variantClasses }}" + class="ons-btn{{ ' ' + params.classes if params.classes else '' }}{% if params.variants and params.variants is not string %}{% for variant in params.variants %}{{ ' ' }}ons-btn--{{ variant }}{% endfor %}{% elif params.variants %}{{ ' ' }}ons-btn--{{ params.variants }}{% endif %}{{ ' ons-btn--link ons-js-submit-btn' if params.url }}{{ variantClasses }}" {% if params.id %}id="{{ params.id }}"{% endif %} {% if params.value and tag != "a" %}value="{{ params.value }}"{% endif %} {% if params.name and tag != "a" %}name="{{ params.name }}"{% endif %}