Sha256: 4d92b1d363124ff845c20561620c39f2cb319e02f8da13cd9847a33868f1850c

Contents?: true

Size: 1.34 KB

Versions: 1

Compression:

Stored size: 1.34 KB

Contents

<%= content_tag(:div,
    aria: object.aria,
    class: object.classname,
    data: object.data,
    id: object.id,
    **combined_html_options) do %>
    <% if object.label.present? %>
        <%= pb_rails("caption", props: {text: object.label, margin_bottom:"xs"}) %>
    <% end %>
    <div class="dropdown_wrapper<%= error_class %>" style="position: relative">
        <input type="hidden" name="<%= object.name %>" id="dropdown-selected-option" value="<%= input_default_value %>" />
        <input id="dropdown-form-validation" name="<%= object.name %>_form_validation" value="<%= input_default_value %>" style="display: none" <%= object.required ? "required" : ""%> />

        <% if content.present? %>
            <%= content.presence %>
            <%= pb_rails("body", props: { status: "negative", text: object.error }) %>
        <% else %>
            <%= pb_rails("dropdown/dropdown_trigger") %>
            <%= pb_rails("dropdown/dropdown_container") do %>
                <% if object.options.present? %>
                    <% object.options.each do |option| %>
                        <%= pb_rails("dropdown/dropdown_option", props: {option: option}) %>
                    <% end %>
                <% end %>
            <% end %>

            <%= pb_rails("body", props: { status: "negative", text: object.error }) %>
        <% end %>
    </div>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
playbook_ui-13.32.0.pre.alpha.PLAY14143288 app/pb_kits/playbook/pb_dropdown/dropdown.html.erb