Class: Protos::Popover::Content

Inherits:
Component
  • Object
show all
Defined in:
lib/protos/popover/content.rb

Direct Known Subclasses

Dropdown::Menu

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#view_template(&block) ⇒ Object

DOCS: The content of a popover. We use a <template> element that is added to the DOM by tippy.js to handle the position of the content. This means content in here will not be available in system tests that use rack_test.

TODO: Move away from using template



13
14
15
16
17
# File 'lib/protos/popover/content.rb', line 13

def view_template(&block)
  template_tag(**template_attrs) do
    div(**attrs, &block)
  end
end