Class: Fluxbit::AvatarGroupComponent

Inherits:
Component
  • Object
show all
Includes:
Config::AvatarComponent
Defined in:
app/components/fluxbit/avatar_group_component.rb

Overview

The ‘Fluxbit::AvatarGroupComponent` is a component for rendering a group of avatars. It extends `Fluxbit::Component` and provides options for configuring the appearance and behavior of the avatar group. You can control the avatars and gravatars displayed within the group. The component supports rendering multiple avatars and gravatars, each of which can be styled or customized through various properties.

Constant Summary

Constants inherited from Component

Component::ComponentObj

Instance Method Summary collapse

Methods inherited from Component

#add, #add_popover_or_tooltip, #anyicon, #element_name, #fx_id, #initialize, #options, #random_id, #remove_class, #render_popover_or_tooltip, #target

Constructor Details

This class inherits a constructor from Fluxbit::Component

Instance Method Details

#callObject



13
14
15
16
17
18
19
20
21
22
# File 'app/components/fluxbit/avatar_group_component.rb', line 13

def call
   :div, class: styles[:group] do
    avatars.each do |avatar|
      concat render(avatar)
    end
    gravatars.each do |gravatar|
      concat render(gravatar)
    end
  end
end