Files
openproject/app/components/op_primer/status_button_component.html.erb
Behrokh Satarnejad 1948ab4e55 [70458] Project status button is missing colors in the dropdown (#21892)
* Set color for icons in status button of projects and meetings

* Apply suggestion from @HDinger

Co-authored-by: Henriette Darge <h.darge@openproject.com>

---------

Co-authored-by: Henriette Darge <h.darge@openproject.com>
2026-02-06 14:52:20 +01:00

24 lines
807 B
Plaintext

<%=
if @readonly || @items.empty?
render(Primer::Beta::Button.new(**button_arguments)) do |button|
button_content(button)
end
else
render(Primer::Alpha::ActionMenu.new(**@menu_arguments)) do |menu|
menu.with_show_button(**button_arguments) do |button|
button_content(button)
end
@items.each do |option|
menu.with_item(**option.item_arguments) do |item|
item.with_leading_visual_icon(icon: option.icon, classes: highlight_class_name(option, :inline)) if option.icon
item.with_description.with_content(option.description) if option.description
classes = option.colored? ? highlight_class_name(option, :inline) : ""
render(Primer::Beta::Text.new(classes:)) { option.name }
end
end
end
end
%>