Previews

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<% subject_id = SecureRandom.hex %>
<%= render(Primer::Alpha::SelectPanel.new(
data: { interaction_subject: subject_id },
select_variant: :single,
fetch_strategy: :local,
open_on_load: open_on_load
)) do |panel| %>
<% panel.with_show_button { "Panel" } %>
<% panel.with_item(label: "Primer", href: "https://primer.style") %>
<% panel.with_item(label: "Microsoft", href: "https://microsoft.com", active: true) %>
<% panel.with_item(label: "GitHub", href: "https://github.com") %>
<% panel.with_item(label: "Catalyst", href: "https://catalyst.rocks") %>
<% end %>
<%= render partial: "primer/alpha/select_panel_preview/interaction_subject_js", locals: { subject_id: subject_id } %>