Sha256: ff9ecbcd5b0d93cf064332a4c20cc437e26687894cbfde6b18185a2afecff46f

Contents?: true

Size: 968 Bytes

Versions: 2

Compression:

Stored size: 968 Bytes

Contents

<primer-text-field>
  <%= render(FormControl.new(input: @input)) do %>
    <%= content_tag(:div, **@field_wrap_arguments) do %>
      <% if @input.leading_visual %>
        <span class="FormControl-input-leadingVisualWrap">
          <%= render(Primer::Beta::Octicon.new(**@input.leading_visual)) %>
        </span>
      <% end %>
      <%= render Primer::ConditionalWrapper.new(condition: @input.auto_check_src, tag: "auto-check", csrf: auto_check_authenticity_token, src: @input.auto_check_src) do %>
        <%= builder.text_field(@input.name, **@input.input_arguments) %>
      <% end %>
      <% if @input.show_clear_button? %>
        <button type="button" id="<%= @input.clear_button_id %>" class="FormControl-input-trailingAction" aria-label="Clear" data-action="click:primer-text-field#clearContents">
          <%= render(Primer::Beta::Octicon.new(icon: :"x-circle-fill")) %>
        </button>
      <% end %>
    <% end %>
  <% end %>
</primer-text-field>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
primer_view_components-0.1.3 lib/primer/forms/text_field.html.erb
primer_view_components-0.1.2 lib/primer/forms/text_field.html.erb