Class: PhlexKit::AvatarGroupCount

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/avatar/avatar_group_count.rb

Overview

Trailing overflow pill in a PhlexKit::AvatarGroup ("+3", or a small svg), ported from shadcn/ui's AvatarGroupCount. Sizes itself to match the group's avatars via :has() in avatar.css. See avatar.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ AvatarGroupCount

Returns a new instance of AvatarGroupCount.



6
7
8
# File 'app/components/phlex_kit/avatar/avatar_group_count.rb', line 6

def initialize(**attrs)
  @attrs = attrs
end

Instance Method Details

#view_template(&block) ⇒ Object



10
11
12
# File 'app/components/phlex_kit/avatar/avatar_group_count.rb', line 10

def view_template(&block)
  div(**mix({ class: "pk-avatar-group-count" }, @attrs), &block)
end