Sha256: c89bef83c2fdbd60080cfdc1d45f6010661c154e518f7ed56feef81be269dd38

Contents?: true

Size: 1.19 KB

Versions: 46

Compression:

Stored size: 1.19 KB

Contents

<% subject_id = SecureRandom.hex %>

<%= form_with(url: generic_form_submission_path(format: route_format)) do |builder| %>
  <%= render(Primer::Alpha::SelectPanel.new(
    data: { interaction_subject: subject_id },
    select_variant: :single,
    fetch_strategy: :local,
    open_on_load: open_on_load,
    dynamic_label: true,
    dynamic_label_prefix: "Item",
    form_arguments: {
      name: :item,
      builder: builder
    }
  )) do |panel| %>
    <% panel.with_show_button { "Panel" } %>
    <% panel.with_item(label: "Item 1", content_arguments: { data: { value: "item1" } }, active: true) %>
    <% panel.with_item(label: "Item 2", content_arguments: { data: { value: "item2" } }) %>
    <% panel.with_item(label: "Item 3", content_arguments: { data: { value: "item3" } }) %>
    <% panel.with_item(label: "Item 4", content_arguments: { data: { value: "item4" } }) %>
    <% panel.with_footer(show_divider: true) do %>
        I'm a footer!
    <% end %>
  <% end %>

  <hr>

  <%= render(Primer::Beta::Button.new(type: :submit, scheme: :primary)) do %>
    Submit
  <% end %>
<% end %>

<%= render partial: "primer/alpha/select_panel_preview/interaction_subject_js", locals: { subject_id: subject_id } %>

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
primer_view_components-0.36.5 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.52.2 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
primer_view_components-0.36.4 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.52.1 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.52.0 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
primer_view_components-0.36.3 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.51.0 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
primer_view_components-0.36.2 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.50.1 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.50.0 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
primer_view_components-0.36.1 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
primer_view_components-0.36.0 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.49.2 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
primer_view_components-0.35.2 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.49.1 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.49.0 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
primer_view_components-0.35.1 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
primer_view_components-0.35.0 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.48.2 previews/primer/alpha/select_panel_preview/single_select_form.html.erb
openproject-primer_view_components-0.48.1 previews/primer/alpha/select_panel_preview/single_select_form.html.erb