mirror of
https://github.com/tabler/tabler.git
synced 2025-12-23 10:24:24 +04:00
16 lines
1.4 KiB
HTML
16 lines
1.4 KiB
HTML
{% removeemptylines %}
|
|
{% assign spinner-class = false %}
|
|
{% assign provider = include.provider | default: 'fe' %}
|
|
{% if include.text %}{% assign spinner-class="mr-2" %}{% endif %}
|
|
{% assign e = include.element | default: 'a' %}
|
|
<{{ e }}{% if e == 'a' %} href="{{ include.href | default: '#' }}"{% endif %}{% if include.type %} type="{{ include.type }}"{% endif %} class="btn{% if include.height %} btn-{{ include.height }}{% endif %}{% if include.color %} btn-{% if include.outline %}outline-{% endif %}{{ include.color }}{% endif %}{% if include.disabled %} disabled{% endif %}{% if include.square %} btn-square{% endif %}{% if include.pill %} btn-pill{% endif %}{% if include['size'] %} btn-{{ include['size'] }}{% endif %}{% if include.class %} {{ include.class }}{% endif %}{% if include.block %} btn-block{% endif %}{% if include.link %} btn-link{% endif %}{% if include.label %} btn-label{% endif %}{% if include.icon-only %} btn-icon{% endif %}">
|
|
{% if include.spinner %}
|
|
{% include ui/spinner.html color=false size="sm" class=spinner-class element="span" %}{% endif %}
|
|
{% if include.icon %}{% include_cached ui/icon.html icon=include.icon use-svg=true %}{% endif %}
|
|
{% unless include.icon-only %}
|
|
{{ include.text | default: "Button" }}
|
|
{% if include.icon-right %}{% include_cached ui/icon.html icon=include.icon-right use-svg=true right=true %}{% endif %}
|
|
{% endunless %}
|
|
</{{ e }}>
|
|
{% endremoveemptylines %}
|