Class: UI::SheetOverlay

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

Instance Method Summary collapse

Methods included from SheetOverlayBehavior

#merged_sheet_overlay_container_data_attributes, #sheet_overlay_base_classes, #sheet_overlay_classes, #sheet_overlay_container_base_classes, #sheet_overlay_container_classes, #sheet_overlay_container_data_attributes, #sheet_overlay_container_html_attributes, #sheet_overlay_data_attributes, #sheet_overlay_html_attributes

Constructor Details

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

Returns a new instance of SheetOverlay.



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

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