Sha256: f77c03f1601707601e8b9d916637196b8ae6161f28a9ea35633e590cfff64294

Contents?: true

Size: 1.21 KB

Versions: 54

Compression:

Stored size: 1.21 KB

Contents

<%= render(FormControl.new(input: @input, tag: :"primer-text-field")) do %>
  <%= content_tag(:div, **@field_wrap_arguments) do %>
    <%# leading spinner implies a leading visual %>
    <% if @input.leading_visual || @input.leading_spinner? %>
      <span class="FormControl-input-leadingVisualWrap">
        <%= render(Primer::Beta::Octicon.new(**@input.leading_visual, data: { target: "primer-text-field.leadingVisual" })) %>
        <% if @input.leading_spinner? %>
          <%= render(Primer::Beta::Spinner.new(size: :small, hidden: true, data: { target: "primer-text-field.leadingSpinner" })) %>
        <% end %>
      </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 %>

Version data entries

54 entries across 54 versions & 2 rubygems

Version Path
openproject-primer_view_components-0.52.1 app/lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.52.0 app/lib/primer/forms/text_field.html.erb
primer_view_components-0.36.3 app/lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.51.0 app/lib/primer/forms/text_field.html.erb
primer_view_components-0.36.2 app/lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.50.1 app/lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.50.0 app/lib/primer/forms/text_field.html.erb
primer_view_components-0.36.1 app/lib/primer/forms/text_field.html.erb
primer_view_components-0.36.0 app/lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.49.2 app/lib/primer/forms/text_field.html.erb
primer_view_components-0.35.2 app/lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.49.1 app/lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.49.0 app/lib/primer/forms/text_field.html.erb
primer_view_components-0.35.1 app/lib/primer/forms/text_field.html.erb
primer_view_components-0.35.0 app/lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.48.2 lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.48.1 lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.48.0 lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.47.1 lib/primer/forms/text_field.html.erb
openproject-primer_view_components-0.47.0 lib/primer/forms/text_field.html.erb