1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
- anchors = local_assigns.fetch(:anchors, [])
- project_buttons = local_assigns.fetch(:project_buttons, false)
- stat_text_classes = "stat-text gl-flex gl-items-center !gl-px-0 !gl-pb-2"
- return unless anchors.any?
%ul.nav.gl-gap-y-2.gl-gap-x-5
- anchors.each do |anchor|
%li.nav-item
- if anchor.link # render actionable link/button
= link_to(anchor.label, anchor.link, stat_anchor_attrs(anchor))
- elsif project_buttons # render disabled button
= render Pajamas::ButtonComponent.new(disabled: true, button_options: { classes: stat_text_classes }) do
= anchor.label
- else # render as text label
%div{ class: stat_text_classes }= anchor.label
|