Class: PhlexKit::AttachmentMedia

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/attachment/attachment_media.rb

Overview

Square preview tile of an Attachment — a file-type icon or an . See attachment.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ AttachmentMedia

Returns a new instance of AttachmentMedia.



5
# File 'app/components/phlex_kit/attachment/attachment_media.rb', line 5

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

Instance Method Details

#view_templateObject



6
# File 'app/components/phlex_kit/attachment/attachment_media.rb', line 6

def view_template(&) = div(**mix({ class: "pk-attachment-media" }, @attrs), &)