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="9mRNVON22zid49XFDaOhwSe1b3SFte-GSw_xUBA-_gdgeRMquLfXYjKKP8-Xq-xRPKiuHah4YXihltRxg07MSw" 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…' })