{%
  set classes = [
  'btn',
  'btn-' ~ type|clean_class,
]
%}

{% if link %}
  <a href="{{ uri }}" class="{{ classes|join(" ") }}">{{ text }}</a>
{% else %}
  <button class="{{ classes|join(" ") }}">{{ text }}</button>
{% endif %}
