TextInput module
This commit is contained in:
21
templates/components/text_input.html.to
Normal file
21
templates/components/text_input.html.to
Normal 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>
|
Reference in New Issue
Block a user