{% set classes = [
  'btn',
  size ? 'btn-' ~ size,
  color ? 'btn-' ~ color,
  variant and variant != 'default' ? 'btn-' ~ variant,
] %}

{% if url %}
  <a {{ attributes.addClass(classes).setAttribute('href', url) }}>
    {{ text }}
  </a>
{% else %}
  <button {{ attributes.addClass(classes) }}>
    {{ text }}
  </button>
{% endif %}
