fix(menu_component): tag html options must be set as keyword args, not hash

This commit is contained in:
Colin Darie 2023-01-30 14:58:13 +01:00
parent d3e0046e9b
commit 3402279b08

View file

@ -2,7 +2,7 @@ class Dropdown::MenuComponent < ApplicationComponent
renders_one :button_inner_html
# beware, items elements like button_to/link_to must include role: 'menuitem' for aria reason
renders_many :items, -> (options = {}, &block) do
tag.li({ role: 'none' }.merge(options), &block)
tag.li(**options.merge(role: 'none'), &block)
end
renders_many :forms