Class: PhlexKit::AlertDialogMedia

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/alert_dialog/alert_dialog_media.rb

Overview

Icon/image tile in an AlertDialogHeader — a muted circle above the title (beside the text column in size :sm dialogs). Ported from shadcn/ui's AlertDialogMedia (newer than ruby_ui's alert dialog). See alert_dialog.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ AlertDialogMedia

Returns a new instance of AlertDialogMedia.



6
7
8
# File 'app/components/phlex_kit/alert_dialog/alert_dialog_media.rb', line 6

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

Instance Method Details

#view_templateObject



10
11
12
# File 'app/components/phlex_kit/alert_dialog/alert_dialog_media.rb', line 10

def view_template(&)
  div(**mix({ class: "pk-alert-dialog-media", aria: { hidden: "true" } }, @attrs), &)
end