Sha256: 1ea82a6308e8f1f7c87476d70ef4dedf5c41713f76b20e7da320da00c1f5ed78

Contents?: true

Size: 1.25 KB

Versions: 4

Compression:

Stored size: 1.25 KB

Contents

<% 
  options = [
    {
      label: "United States",
      value: "United States",
      areaCode: "+1",
      icon: "πŸ‡ΊπŸ‡Έ",
      id: "United-states"
    },
    {
      label: "Canada",
      value: "Canada",
      areaCode: "+1",
      icon: "πŸ‡¨πŸ‡¦",
      id: "canada"
    },
    {
      label: "Pakistan",
      value: "Pakistan",
      areaCode: "+92",
      icon: "πŸ‡΅πŸ‡°",
      id: "pakistan"
    }
  ]

%>

<%= pb_rails("dropdown", props: {options: options}) do %>
    <%= pb_rails("dropdown/dropdown_trigger") %>
    <%= pb_rails("dropdown/dropdown_container") do %>
        <% options.each do |option| %>
            <%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
                <%= pb_rails("flex/flex_item") do %>
                    <%= pb_rails("flex") do %>
                        <%= pb_rails("icon", props: {icon: option[:icon]}) %>
                        <%= pb_rails("body", props: {text: option[:label], padding_left:"xs"}) %>
                    <% end %>
                <% end %>
                <%= pb_rails("flex/flex_item") do %>
                    <%= pb_rails("body", props: {color:"light", text: option[:areaCode]}) %>
                <% end %>
            <% end %>
        <% end %>
    <% end %>
<% end %>

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
playbook_ui_docs-13.27.0 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.html.erb
playbook_ui-13.27.0 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.html.erb
playbook_ui_docs-13.26.0.pre.alpha.jasoncypretpatch12820 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.html.erb
playbook_ui-13.26.0.pre.alpha.jasoncypretpatch12820 app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.html.erb