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
openproject-primer_view_components-0.48.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.47.1 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.47.0 lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.34.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.46.1 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.46.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.45.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.44.3 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.44.2 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.44.1 lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.33.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.44.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.43.1 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.43.0 lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.32.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.42.0 lib/primer/forms/toggle_switch.html.erb
primer_view_components-0.31.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.41.1 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.41.0 lib/primer/forms/toggle_switch.html.erb
openproject-primer_view_components-0.40.0 lib/primer/forms/toggle_switch.html.erb