2023-01-06 14:11:00 +01:00
|
|
|
= content_tag(@wrapper, wrapper_options) do
|
2023-07-04 10:15:58 +02:00
|
|
|
%button{ class: button_class_names, id: button_id, disabled: disabled?, data: data, "aria-expanded": "false", 'aria-haspopup': 'true', 'aria-controls': menu_id }
|
2023-01-04 06:10:24 +01:00
|
|
|
= button_inner_html
|
|
|
|
|
|
|
|
%div{ data: { menu_button_target: 'menu' }, id: menu_id, 'aria-labelledby': button_id, role: menu_role, 'tab-index': -1, class: menu_class_names }
|
2023-06-08 11:25:39 +02:00
|
|
|
= menu_header_html
|
2023-01-04 06:10:24 +01:00
|
|
|
|
|
|
|
-# the dropdown can be a menu with a list of item
|
|
|
|
- if items?
|
2023-07-12 10:48:13 +02:00
|
|
|
%ul.dropdown-items{ role: 'none' }
|
2023-01-04 06:10:24 +01:00
|
|
|
- items.each do |dropdown_item|
|
|
|
|
= dropdown_item
|
|
|
|
-# the dropdown can be a menu with forms
|
|
|
|
- if forms?
|
|
|
|
- forms.each do |form|
|
|
|
|
= form
|