Sha256: 6a8d90eaefcd2bd51f20931e8e5083803f4c660b7157301ab227b8116916c81c

Contents?: true

Size: 788 Bytes

Versions: 16

Compression:

Stored size: 788 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 %>

    <div><%= render(Caption.new(input: @input)) %></div>
  </span>
  <%= render(Primer::Alpha::ToggleSwitch.new(src: @input.src, csrf_token: @input.csrf, **@input.input_arguments)) %>
<% end %>

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
openproject-primer_view_components-0.37.1 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.37.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.36.2 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.36.1 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.36.0 lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.27.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.35.2 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.35.1 lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.26.1 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.35.0 lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.26.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.34.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.33.2 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.33.1 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.33.0 lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.25.1 lib/primer/forms/toggle_switch.html.erb