20 lines
788 B
HTML
20 lines
788 B
HTML
{% load allauth %}
|
|
{% setvar variant %}
|
|
{% if "warning" in attrs.tags %}
|
|
warning
|
|
{% elif "danger" in attrs.tags %}
|
|
danger
|
|
{% elif "secondary" in attrs.tags %}
|
|
secondary
|
|
{% elif "success" in attrs.tags %}
|
|
success
|
|
{% else %}
|
|
primary
|
|
{% endif %}
|
|
{% endsetvar %}
|
|
<span {% if attrs.title %}title="{{ attrs.title }}"{% endif %}
|
|
class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium {% if variant == "warning" %}bg-amber-100 text-amber-800{% elif variant == "danger" %}bg-red-100 text-red-800{% elif variant == "secondary" %}bg-slate-100 text-slate-700{% elif variant == "success" %}bg-green-100 text-green-800{% else %}bg-blue-100 text-blue-800{% endif %}">
|
|
{% slot %}
|
|
{% endslot %}
|
|
</span>
|