x
1
2
3
4
5
6
7
<form class="usa-form" id="new_text_area_component_preview_article" action="#" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="-XV_fq3n3ASk_ILJnH9Q7lNvPZn4xWSVAd9INDMNUi63wsQ1eM4bllJuegurv4oXdwxP6bqcpPSc1rfklfg6Ig" autocomplete="off" />
<div class=''>
<label class="usa-label" for="text_area_component_preview_article_body">Body</label>
<textarea autofocus="autofocus" placeholder="Once upon a time…" class="usa-textarea" name="text_area_component_preview_article[body]" id="text_area_component_preview_article_body">
</textarea>
</div>
</form>
1
2
3
4
5
- article = UswdsComponents::TextAreaComponentPreview::Article.new
= form_for article, url: '#', html: { class: 'usa-form' } do |f|
= render UswdsComponents::TextAreaComponent.new(form: f, attribute: :body,
input_options: { autofocus: true, placeholder: 'Once upon a time…' })