Previews

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<% subject_id = SecureRandom.hex %>
<%= render(Primer::Alpha::SelectPanel.new(
data: { interaction_subject: subject_id },
id: "with_avatar_items",
title: "Select users",
select_variant: :multiple,
fetch_strategy: :local,
open_on_load: open_on_load
)) do |panel| %>
<% panel.with_show_button { "Choose users" } %>
<% panel.with_avatar_item(
username: "hulk_smash",
src: "https://avatars.githubusercontent.com/u/103004183?v=4",
) %>
<% end %>
<%= render partial: "primer/alpha/select_panel_preview/interaction_subject_js", locals: { subject_id: subject_id } %>