module Golden::Theme::Foundation::DropdownsHelper

Public Instance Methods

foundation_dropdown_button(text, options = {}) click to toggle source
# File lib/golden/theme/foundation/dropdowns_helper.rb, line 3
def foundation_dropdown_button text, options = {}
  text = text.html_safe
  target = options.delete :target
  options = {
    data: {
      dropdown: target
    }
  }.deep_merge options
  content_tag :button, text, options
end
foundation_dropdown_content(options = {}) click to toggle source
# File lib/golden/theme/foundation/dropdowns_helper.rb, line 36
def foundation_dropdown_content options = {}, &block
  html_class = options.delete :class
  options = {
    class: "f-dropdown content #{html_class}".strip,
    data: {
      dropdown_content: true
    }
  }.deep_merge options
  content_tag :div, options, &block
end
foundation_dropdown_ul_tag(options = {}) click to toggle source
# File lib/golden/theme/foundation/dropdowns_helper.rb, line 25
def foundation_dropdown_ul_tag options = {}, &block
  html_class = options.delete :class
  options = {
    class: "f-dropdown #{html_class}".strip,
    data: {
      dropdown_content: true
    }
  }.deep_merge options
  foundation_ul_tag options, &block
end