Sha256: 9ff3e74f4092ed65da36a722b63345c6ea835c91a9ac3d21e85ed55d7cd45216

Contents?: true

Size: 783 Bytes

Versions: 46

Compression:

Stored size: 783 Bytes

Contents

<%= content_tag("toggle-switch-input", class: "FormControl-toggleSwitchInput", hidden: @input.hidden?) do %>
  <span style="flex-grow: 1">
    <%= render(Primer::Forms::PrimerBaseComponentWrapper.new(tag: :span, **@input.label_arguments)) do %>
      <%= @input.label %>
    <% end %>

    <%= content_tag(:div, data: { target: "toggle-switch-input.validationElement" }, **@input.validation_arguments) do %>
      <%= content_tag(:span, @input.validation_messages.first, data: { target: "toggle-switch-input.validationMessageElement" }, **@input.validation_message_arguments) %>
    <% end %>
  </span>
  <%= render(Primer::Alpha::ToggleSwitch.new(src: @input.src, csrf_token: @input.csrf, **@input.input_arguments)) %>
<% end %>
<div><%= render(Caption.new(input: @input)) %></div>

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
primer_view_components-0.36.5 app/lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.52.2 app/lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.36.4 app/lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.52.1 app/lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.52.0 app/lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.36.3 app/lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.51.0 app/lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.36.2 app/lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.50.1 app/lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.50.0 app/lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.36.1 app/lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.36.0 app/lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.49.2 app/lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.35.2 app/lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.49.1 app/lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.49.0 app/lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.35.1 app/lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.35.0 app/lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.48.2 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.48.1 lib/primer/forms/toggle_switch.html.erb