Class: PhlexKit::TooltipContent

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/tooltip/tooltip_content.rb

Overview

The tooltip bubble, revealed on hover/focus of its PhlexKit::Tooltip. See tooltip.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ TooltipContent

Returns a new instance of TooltipContent.



4
5
6
# File 'app/components/phlex_kit/tooltip/tooltip_content.rb', line 4

def initialize(**attrs)
  @attrs = attrs
end

Instance Method Details

#view_template(&block) ⇒ Object



8
9
10
# File 'app/components/phlex_kit/tooltip/tooltip_content.rb', line 8

def view_template(&block)
  div(**mix({ class: "pk-tooltip-content", role: "tooltip" }, @attrs), &block)
end