{{ $colors := dict "green" "bg-green-600 hover:!bg-green-500 dark:bg-green-800 dark:hover:!bg-green-700" "blue" "bg-blue-600 hover:!bg-blue-500 dark:bg-blue-800 dark:hover:!bg-blue-700" "orange" "bg-orange-600 hover:!bg-orange-500 dark:bg-orange-800 dark:hover:!bg-orange-700" "black" "bg-black hover:!bg-gray-500 dark:bg-white dark:hover:!bg-gray-700 dark:!text-black" "red" "bg-red-600 hover:!bg-red-500 dark:bg-red-800 dark:hover:!bg-red-700" "teal" "bg-teal-600 hover:!bg-teal-500 dark:bg-teal-800 dark:hover:!bg-teal-700" "primary" "bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700" }}

<a class="{{ print "px-4 py-2 !text-neutral !no-underline !rounded-md " (index $colors (or .color "primary")) }}"
    href="{{ .href }}" target="{{ or .target " _blank" }}" role="button">
    {{ .text }}
</a>