Sha256: 057b4f1c51da4c349c4c5de5cf177fb7c21cb2ffc84bab55bdb7f2321d1722f6

Contents?: true

Size: 829 Bytes

Versions: 2

Compression:

Stored size: 829 Bytes

Contents

<%= render(FormControl.new(input: @input)) do %>
  <% if @input.leading_visual || @input.show_clear_button? %>
    <%= content_tag(:div, **@field_wrap_arguments) do %>
      <% if @input.leading_visual %>
        <span class="FormControl-input-leadingVisualWrap">
          <%= render(Primer::OcticonComponent.new(**@input.leading_visual)) %>
        </span>
      <% end %>
      <%= builder.text_field(@input.name, **@input.input_arguments) %>
      <% if @input.show_clear_button? %>
        <button id="<%= @input.clear_button_id %>" class="FormControl-input-trailingAction" aria-label="Clear">
          <%= render(Primer::OcticonComponent.new(icon: :"x-circle-fill")) %>
        </button>
      <% end %>
    <% end %>
  <% else %>
    <%= builder.text_field(@input.name, **@input.input_arguments) %>
  <% end %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
primer_view_components-0.0.114 lib/primer/forms/text_field.html.erb
primer_view_components-0.0.113 lib/primer/forms/text_field.html.erb