Module: Golden::Theme::Foundation::DropdownsHelper
- Defined in:
- lib/golden/theme/foundation/dropdowns_helper.rb
Instance Method Summary collapse
- #foundation_dropdown_button(text, options = {}) ⇒ Object
- #foundation_dropdown_content(options = {}, &block) ⇒ Object
- #foundation_dropdown_link_to(text, url = '#', options = {}) ⇒ Object
- #foundation_dropdown_ul_tag(options = {}, &block) ⇒ Object
Instance Method Details
#foundation_dropdown_button(text, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/golden/theme/foundation/dropdowns_helper.rb', line 3 def text, = {} text = text.html_safe target = .delete :target = { data: { dropdown: target } }.deep_merge content_tag :button, text, end |
#foundation_dropdown_content(options = {}, &block) ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/golden/theme/foundation/dropdowns_helper.rb', line 36 def foundation_dropdown_content = {}, &block html_class = .delete :class = { class: "f-dropdown content #{html_class}".strip, data: { dropdown_content: true } }.deep_merge content_tag :div, , &block end |
#foundation_dropdown_link_to(text, url = '#', options = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/golden/theme/foundation/dropdowns_helper.rb', line 14 def foundation_dropdown_link_to text, url = '#', = {} text = text.html_safe target = .delete :target = { data: { dropdown: target } }.deep_merge link_to text, url, end |
#foundation_dropdown_ul_tag(options = {}, &block) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/golden/theme/foundation/dropdowns_helper.rb', line 25 def foundation_dropdown_ul_tag = {}, &block html_class = .delete :class = { class: "f-dropdown #{html_class}".strip, data: { dropdown_content: true } }.deep_merge foundation_ul_tag , &block end |