Sha256: b04fa30699dc71273db5125a61b5a1b6fe68b4b215d8fe283ca5e44a0c949fd5

Contents?: true

Size: 1.95 KB

Versions: 1036

Compression:

Stored size: 1.95 KB

Contents

<% 
  options = [
    {
      label: "Jasper Furniss",
      value: "Jasper Furniss",
      territory: "PHL",
      title: "Senior UX Engineer",
      id: "jasper-furniss",
      status: "Offline"
    },
    {
      label: "Ramon Ruiz",
      value: "Ramon Ruiz",
      territory: "PHL",
      title: "Senior UX Designer",
      id: "ramon-ruiz",
      status: "Away"
    },
    {
      label: "Jason Cypret",
      value: "Jason Cypret",
      territory: "PHL",
      title: "VP of User Experience",
      id: "jason-cypret",
      status: "Online"
    },
    {
      label: "Courtney Long",
      value: "Courtney Long",
      territory: "PHL",
      title: "UX Design Mentor",
      id: "courtney-long",
      status: "Online"
    }
  ]

%>

<%
  custom_display = capture do
    pb_rails("avatar", props: { name: "Courtney Long", size: "xs" })
  end
%>


<%= pb_rails("dropdown", props: {options: options}) do %>
    <%= pb_rails("dropdown/dropdown_trigger", props: {placeholder: "Select a User", custom_display: custom_display}) %>
    <%= pb_rails("dropdown/dropdown_container") do %>
        <% options.each do |option| %>
            <%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
              <%= pb_rails("flex", props: {
                align: "center",
                justify: "between",
                }) do %>
                  <%= pb_rails("flex/flex_item") do %>
                      <%= pb_rails("user", props: {name: option[:label], align:"left", avatar: true, orientation:"horizontal", territory:option[:territory], title: option[:title]}) %>
                  <% end %>
                  <%= pb_rails("flex/flex_item") do %>
                      <%= pb_rails("badge", props: {rounded: true, dark: true, text: option[:status], variant: option[:status] == "Offline" ? "neutral" : option[:status] == "Online" ? "success" : "warning" }) %>
                  <% end %>
              <% end %>
            <% end %>
        <% end %>
    <% end %>
<% end %>

Version data entries

1,036 entries across 1,036 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui_docs-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui_docs-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui_docs-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui_docs-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui_docs-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui_docs-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui_docs-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui_docs-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui_docs-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
playbook_ui-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb