Skip to content
Snippets Groups Projects
Commit cae03f8b authored by Phil Hughes's avatar Phil Hughes
Browse files

Custom ID & toggle class on dropdown

parent 44075329
No related branches found
No related tags found
No related merge requests found
module DropdownsHelper
def dropdown_tag(toggle_text, title: false, filter: false, placeholder: "", &block)
def dropdown_tag(toggle_text, id: nil, toggle_class: nil, title: false, filter: false, placeholder: "", &block)
content_tag :div, class: "dropdown" do
dropdown_output = ""
dropdown_output += content_tag :button, class: "dropdown-menu-toggle", type: "button", data: {toggle: "dropdown"} do
dropdown_output += content_tag :button, class: "dropdown-menu-toggle #{toggle_class}", id: id, type: "button", data: {toggle: "dropdown"} do
output = toggle_text
output << icon('chevron-down')
output.html_safe
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment