Sha256: b100e1e00d0274d3e486c5a9b0b25daa6366d10847a0f47205c3ecb0a68bded6

Contents?: true

Size: 1.65 KB

Versions: 2

Compression:

Stored size: 1.65 KB

Contents

<%= pb_content_tag do %>
    <% if content.present? %>
        <div style="display: inline-block" tabindex="0" data-dropdown-custom-trigger>
          <%= content.presence %>
        </div>
    <% else %>
    <%= pb_rails("flex", props: {
        align: "center", 
        border_radius:"lg", 
        classname: object.trigger_wrapper_classes, 
        cursor: "pointer", 
        justify: "between", 
        padding_x:"sm", 
        padding_y:"xs",
        html_options: {tabindex:"0"}
        }) do %>
        <%= pb_rails("flex/flex_item") do %>
            <%= pb_rails("flex", props: {align: "center"}) do %>
                <% if object.custom_display.present?  %>
                    <%= pb_rails("flex", props: {align: "center"}) do %>
                        <div id="dropdown_trigger_custom_display" style="display: none;"> 
                            <%= object.custom_display %>
                        </div>
                        <%= pb_rails("body", props: {text: object.default_display_placeholder, id: "dropdown_trigger_display"}) %>
                    <% end %>
                <% else %>
                <%= pb_rails("body", props: {text: object.default_display_placeholder, id: "dropdown_trigger_display"}) %>
                <% end %>
            <% end %>
        <% end %>
            <%= pb_rails("body", props: {display: "flex"}) do  %>
                <%= pb_rails("icon", props: {icon: "chevron-down", cursor: "pointer", size:"sm", id: "dropdown_open_icon"}) %>
                <%= pb_rails("icon", props: {icon: "chevron-up", cursor: "pointer", size:"sm", id: "dropdown_close_icon"}) %>
            <% end %>
    <% end %>
    <% end %>
<% end %>
      

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
playbook_ui-13.26.0.pre.alpha.jasoncypretpatch12820 app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb
playbook_ui-13.25.0.pre.alpha.PBNTR291Dropdownrailsv22812 app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb