Class: PhlexKit::AvatarGroupCount
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::AvatarGroupCount
- 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
-
#initialize(**attrs) ⇒ AvatarGroupCount
constructor
A new instance of AvatarGroupCount.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
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 |