TextInput module

This commit is contained in:
Andrew Croce
2018-07-25 12:02:02 -04:00
parent 0cffa63b5d
commit a315aef576
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<div class='usa-input {% if errors %}usa-input--error{% end %}'>
<label for={{input.name}}>
{{ label }}
{% if description %}
<span class='usa-input__help'>{% raw description %}</span>
{% end %}
{% if errors %}
{% module Icon('alert') %}
{% end %}
</label>
{% raw input(placeholder=placeholder) %}
{% if errors %}
{% for error in errors %}
<span class='usa-input__message'>{{ error }}</span>
{% end %}
{% end %}
</div>