Class: UI::DialogContent

Inherits:
Phlex::HTML
  • Object
show all
Includes:
DialogContentBehavior
Defined in:
app/components/ui/dialog_content.rb

Instance Method Summary collapse

Methods included from DialogContentBehavior

#dialog_content_base_classes, #dialog_content_classes, #dialog_content_data_attributes, #dialog_content_html_attributes, #merged_dialog_content_data_attributes

Constructor Details

#initialize(open: false, classes: nil, **attributes) ⇒ DialogContent

Returns a new instance of DialogContent.



6
7
8
9
10
# File 'app/components/ui/dialog_content.rb', line 6

def initialize(open: false, classes: nil, **attributes)
  @open = open
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#view_template(&block) ⇒ Object



12
13
14
15
16
# File 'app/components/ui/dialog_content.rb', line 12

def view_template(&block)
  div(**dialog_content_html_attributes) do
    yield if block_given?
  end
end