Class: Avo::Sidebar::GroupComponent

Inherits:
BaseItemComponent
  • Object
show all
Defined in:
app/components/avo/sidebar/group_component.rb

Instance Method Summary collapse

Instance Method Details

#group_has_any_icon?Boolean

True if any visible item in the group has an icon (so all items should reserve icon space for alignment).

Returns:

  • (Boolean)


5
6
7
# File 'app/components/avo/sidebar/group_component.rb', line 5

def group_has_any_icon?
  @items.any? { |child| child.try(:icon).present? }
end