Class: FoxTail::AvatarStackComponent
Instance Attribute Summary
#html_attributes
Instance Method Summary
collapse
classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class
Methods inherited from Base
fox_tail_config
Instance Method Details
#before_render ⇒ Object
42
43
44
45
46
|
# File 'app/components/fox_tail/avatar_stack_component.rb', line 42
def before_render
super
html_attributes[:class] = classnames theme.apply(:root, self), html_class
end
|
#call ⇒ Object
48
49
50
51
52
53
|
# File 'app/components/fox_tail/avatar_stack_component.rb', line 48
def call
content_tag :div, html_attributes do
avatars.each { |avatar| concat avatar }
concat counter if counter?
end
end
|
#render? ⇒ Boolean
38
39
40
|
# File 'app/components/fox_tail/avatar_stack_component.rb', line 38
def render?
avatars? || counter?
end
|