views/mdc/components/text_area.erb in voom-presenters-0.2.0 vs views/mdc/components/text_area.erb in voom-presenters-2.0.0

- old
+ new

@@ -1,20 +1,18 @@ <div id="<%= comp.id %>" class="v-input v-text-field mdc-text-field mdc-text-field--textarea - <%= ' is-invalid is-dirty' if comp.error%>" - <% if comp.tag %> - data-input-tag="<%= comp.tag %>" - <% end %> + <% if comp.disabled %>mdc-text-field--disabled<% end %>" + <% if comp.tag %>data-input-tag="<%= comp.tag %>"<% end %> + <% if comp.dirtyable %>data-dirtyable<% end %> style="<%= 'width:100%' if comp.full_width %>"> <textarea id="<%= comp.id %>-input" name="<%= comp.name %>" class="mdc-text-field__input" + aria-controls="<%= comp.id %>-input-helper-text" + <%= 'required' if comp.required %> rows="<%= comp.rows %>" - cols="<%= comp.cols %>"> <%= comp.value %> </textarea> - <label for="<%= comp.id %>-input" class="mdc-floating-label"><%= expand_text(comp.label) %></label> + cols="<%= comp.cols %>" + <% if comp.disabled %>disabled<% end %>><%= comp.value %></textarea> + <%= erb :"components/shared/input_label", :locals => {comp: comp} %> </div> -<% if comp.error || comp.hint %> -<p id="<%= comp.id %>-input-helper-text" class="mdc-text-field-helper-text mdc-text-field-helper-text--persistent mdc-text-field-helper-text--validation-msg" aria-hidden="true"> - <%= comp.error || comp.hint %> -</p> -<% end %> +<%= erb :"components/shared/hint_error_display", :locals => {comp: comp} %> <%= erb :"components/tooltip", :locals => {comp: comp.tooltip, parent_id: comp.id} %>