Class: PhlexKit::AttachmentMedia
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::AttachmentMedia
- 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
-
#initialize(**attrs) ⇒ AttachmentMedia
constructor
A new instance of AttachmentMedia.
- #view_template ⇒ Object
Methods inherited from BaseComponent
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_template ⇒ Object
6 |
# File 'app/components/phlex_kit/attachment/attachment_media.rb', line 6 def view_template(&) = div(**mix({ class: "pk-attachment-media" }, @attrs), &) |