Class: UI::DialogOverlay

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

Instance Method Summary collapse

Methods included from DialogOverlayBehavior

#dialog_overlay_base_classes, #dialog_overlay_classes, #dialog_overlay_container_base_classes, #dialog_overlay_container_classes, #dialog_overlay_container_data_attributes, #dialog_overlay_container_html_attributes, #dialog_overlay_data_attributes, #dialog_overlay_html_attributes, #merged_dialog_overlay_container_data_attributes

Constructor Details

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

Returns a new instance of DialogOverlay.



6
7
8
9
10
# File 'app/components/ui/dialog_overlay.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
17
# File 'app/components/ui/dialog_overlay.rb', line 12

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