Class: UI::TooltipContent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::TooltipContent
- Includes:
- TooltipContentBehavior
- Defined in:
- app/components/ui/tooltip_content.rb
Overview
Content - Phlex implementation
The popup content that displays tooltip information. Positioned by Floating UI via Stimulus controller.
Instance Method Summary collapse
-
#initialize(side: "top", align: "center", side_offset: 4, classes: "", **attributes) ⇒ TooltipContent
constructor
A new instance of TooltipContent.
- #view_template(&block) ⇒ Object
Methods included from TooltipContentBehavior
#tooltip_content_classes, #tooltip_content_data_attributes, #tooltip_content_html_attributes
Constructor Details
#initialize(side: "top", align: "center", side_offset: 4, classes: "", **attributes) ⇒ TooltipContent
Returns a new instance of TooltipContent.
24 25 26 27 28 29 30 |
# File 'app/components/ui/tooltip_content.rb', line 24 def initialize(side: "top", align: "center", side_offset: 4, classes: "", **attributes) @side = side @align = align @side_offset = side_offset @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
32 33 34 |
# File 'app/components/ui/tooltip_content.rb', line 32 def view_template(&block) div(**tooltip_content_html_attributes.deep_merge(@attributes), &block) end |