Class: UI::HoverCardContent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::HoverCardContent
- Includes:
- HoverCardContentBehavior
- Defined in:
- app/components/ui/hover_card_content.rb
Overview
Content - Phlex implementation
The content that appears on hover. Uses HoverCardContentBehavior for shared styling logic.
Instance Method Summary collapse
-
#initialize(align: "center", side_offset: 4, classes: "", **attributes) ⇒ HoverCardContent
constructor
A new instance of HoverCardContent.
- #view_template(&block) ⇒ Object
Methods included from HoverCardContentBehavior
#content_classes, #content_data_attributes, #content_html_attributes
Constructor Details
#initialize(align: "center", side_offset: 4, classes: "", **attributes) ⇒ HoverCardContent
Returns a new instance of HoverCardContent.
22 23 24 25 26 27 |
# File 'app/components/ui/hover_card_content.rb', line 22 def initialize(align: "center", side_offset: 4, classes: "", **attributes) @align = align @side_offset = side_offset @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
29 30 31 |
# File 'app/components/ui/hover_card_content.rb', line 29 def view_template(&block) div(**content_html_attributes, &block) end |