Class: PhlexKit::Popover
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::Popover
- Defined in:
- app/components/phlex_kit/popover/popover.rb
Overview
Click-triggered floating panel — native [popover] + CSS anchor positioning with viewport-edge flipping (no @floating-ui). Ported from ruby_ui's RubyUI::Popover. Compose Popover > (PopoverTrigger + PopoverContent). phlex-kit--popover.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ Popover
constructor
A new instance of Popover.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ Popover
Returns a new instance of Popover.
7 |
# File 'app/components/phlex_kit/popover/popover.rb', line 7 def initialize(**attrs) = (@attrs = attrs) |
Instance Method Details
#view_template ⇒ Object
8 9 10 |
# File 'app/components/phlex_kit/popover/popover.rb', line 8 def view_template(&) div(**mix({ class: "pk-popover", data: { controller: "phlex-kit--popover" } }, @attrs), &) end |