Class: UI::HoverCard
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::HoverCard
- Includes:
- HoverCardBehavior
- Defined in:
- app/components/ui/hover_card.rb
Overview
HoverCard - Phlex implementation
Container for hover card trigger and content. Uses HoverCardBehavior for shared styling logic.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ HoverCard
constructor
A new instance of HoverCard.
- #view_template(&block) ⇒ Object
Methods included from HoverCardBehavior
#hover_card_classes, #hover_card_data_attributes, #hover_card_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ HoverCard
Returns a new instance of HoverCard.
18 19 20 21 |
# File 'app/components/ui/hover_card.rb', line 18 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
23 24 25 |
# File 'app/components/ui/hover_card.rb', line 23 def view_template(&block) div(**hover_card_html_attributes, &block) end |