29 lines
1.0 KiB
Twig
29 lines
1.0 KiB
Twig
<!-- {id, label, type?, placeholder?, autocomplete?} -->
|
|
{% macro input(args) %}
|
|
<div class="mb-4">
|
|
<label
|
|
for="{{ args.id }}"
|
|
class="font-bold text-grey-darker block mb-2"
|
|
>{{ args.label }}</label>
|
|
<input
|
|
id="{{ args.id }}"
|
|
name="{{ args.id }}"
|
|
{% if args.type %}type="{{ args.type }}"{% endif %}
|
|
{% if args.autocomplete %}autocomplete="{{ args.autocomplete }}"{% endif %}
|
|
{% if args.placeholder %}placeholder="{{ args.placeholder }}"{% endif %}
|
|
class="shadow focus:shadow-outline block appearance-none w-full bg-gray-700 border-gray-500 hover:border-gray-500 px-2 py-2 rounded shadow"
|
|
/>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro submit(value) %}
|
|
<div class="flex items-center mt-6">
|
|
<button
|
|
type="submit"
|
|
class="w-full bg-teal-500 hover:bg-teal-400 text-white font-bold py-2 px-4 rounded"
|
|
>
|
|
{{ value }}
|
|
</button>
|
|
</div>
|
|
{% endmacro %}
|