re-add button titles

This commit is contained in:
Lukáš Kucharczyk 2024-09-10 14:46:10 +02:00
parent 1f535a6e84
commit 2fc661dade
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
2 changed files with 5 additions and 0 deletions

View File

@ -3,16 +3,19 @@
class="[&:first-of-type_button]:rounded-s-lg [&:last-of-type_button]:rounded-e-lg"> class="[&:first-of-type_button]:rounded-s-lg [&:last-of-type_button]:rounded-e-lg">
{% if color == "gray" %} {% if color == "gray" %}
<button type="button" <button type="button"
title="{{ title }}"
class="px-2 py-1 text-xs font-medium text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white"> class="px-2 py-1 text-xs font-medium text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white">
{{ slot }} {{ slot }}
</button> </button>
{% elif color == "red" %} {% elif color == "red" %}
<button type="button" <button type="button"
title="{{ title }}"
class="px-2 py-1 text-xs font-medium text-gray-900 bg-white border border-gray-200 hover:bg-red-500 hover:text-white focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:border-red-700 dark:hover:bg-red-700 dark:focus:ring-blue-500 dark:focus:text-white"> class="px-2 py-1 text-xs font-medium text-gray-900 bg-white border border-gray-200 hover:bg-red-500 hover:text-white focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:border-red-700 dark:hover:bg-red-700 dark:focus:ring-blue-500 dark:focus:text-white">
{{ slot }} {{ slot }}
</button> </button>
{% elif color == "green" %} {% elif color == "green" %}
<button type="button" <button type="button"
title="{{ title }}"
class="px-2 py-1 text-xs font-medium text-gray-900 bg-white border border-gray-200 hover:bg-green-500 hover:border-green-600 hover:text-white focus:z-10 focus:ring-2 focus:ring-green-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:border-green-700 dark:hover:bg-green-600 dark:focus:ring-green-500 dark:focus:text-white"> class="px-2 py-1 text-xs font-medium text-gray-900 bg-white border border-gray-200 hover:bg-green-500 hover:border-green-600 hover:text-white focus:z-10 focus:ring-2 focus:ring-green-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:border-green-700 dark:hover:bg-green-600 dark:focus:ring-green-500 dark:focus:text-white">
{{ slot }} {{ slot }}
</button> </button>

View File

@ -108,6 +108,7 @@ def list_purchases(request: HttpRequest) -> HttpResponse:
"edit_purchase", args=[purchase.pk] "edit_purchase", args=[purchase.pk]
), ),
"slot": Icon("edit"), "slot": Icon("edit"),
"title": "Edit",
"color": "gray", "color": "gray",
}, },
{ {
@ -115,6 +116,7 @@ def list_purchases(request: HttpRequest) -> HttpResponse:
"delete_purchase", args=[purchase.pk] "delete_purchase", args=[purchase.pk]
), ),
"slot": Icon("delete"), "slot": Icon("delete"),
"title": "Delete",
"color": "red", "color": "red",
}, },
] ]