Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<div>
<strong>NOTE: </strong>The
<pre style="display: inline">FormControl </pre>
component cannot automatically connect
the label to the provided input. Please take care to pass the
<pre style="display: inline">for:</pre>
attribute
to
<pre style="display: inline">FormControl</pre>
, eg:
<pre style="display: inline">Primer::Alpha::FormControl.new(label_arguments: { for: "field-name-or-id" })</pre>
.
- Your friendly neighborhood accessibility team.
</div>
<br>
<form action="/foo" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="oyaezJ1fHCE1U71mUJSWWmgCP8vxphKxSjnZVIT2Hbd9WGoBEQ0SE02ZQKm65Jw7MpLVojqcnh8d0G4xlTNFiw" autocomplete="off" />
<div data-view-component="true" class="FormControl">
<label for="bar" data-view-component="true" class="FormControl-label">
Best character
</label> <input type="text" name="bar" id="bar" />
</div>
</form>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div>
<strong>NOTE: </strong>The <pre style="display: inline">FormControl </pre>component cannot automatically connect
the label to the provided input. Please take care to pass the <pre style="display: inline">for:</pre> attribute
to <pre style="display: inline">FormControl</pre>, eg:
<pre style="display: inline">Primer::Alpha::FormControl.new(label_arguments: { for: "field-name-or-id" })</pre>.
- Your friendly neighborhood accessibility team.
</div>
<br>
<%= form_with(url: "/foo") do |f| %>
<%= render(Primer::Alpha::FormControl.new(**system_arguments, label_arguments: { for: "bar" })) do |component| %>
<% component.with_input do |input_arguments| %>
<%= f.text_field(:bar, **input_arguments) %>
<% end %>
<% end %>
<% end %>

No assets to display.