[TASK] refactor code and add base css components

This commit is contained in:
Marie Birner
2023-04-07 09:44:08 +02:00
parent 0ee9967d3a
commit 1490b191af
14 changed files with 165 additions and 133 deletions

View File

@ -24,9 +24,9 @@
<div class="h-8"></div>
{% endmacro header %}
{% macro input(label, name, type, required=false) %}
{% macro input(label, name, type, required=false, class='rounded-md') %}
<label for="{{ name }}" class="sr-only">{{ label }}</label>
<input id="{{ name }}" name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} class="relative block w-full rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:z-10 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6" placeholder="{{ label }}">
<input id="{{ name }}" name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} class="input {{ class }}" placeholder="{{ label }}">
{% endmacro input %}
{% macro checkbox(label, name, id='', checked=false) %}