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="Td1MFp6Mo_m6eAmLZXJj5TlJzA02j2i6fVuUv-dgWu-qIwaeHceadQrU4aff0QTMdWIwZ6wBMeOvABac_7PDzQ" 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…' })