Class: Ui::Tooltip::Component
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Ui::Tooltip::Component
- Defined in:
- lib/uikit_rails/templates/components/tooltip/component.rb
Overview
Hover/focus tooltip popup.
Constant Summary collapse
- POSITIONS =
%i[top bottom left right].freeze
Instance Attribute Summary collapse
-
#html_attrs ⇒ Object
readonly
Returns the value of attribute html_attrs.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text:, position: :top, **html_attrs) ⇒ Component
constructor
A new instance of Component.
Constructor Details
#initialize(text:, position: :top, **html_attrs) ⇒ Component
Returns a new instance of Component.
11 12 13 14 15 16 |
# File 'lib/uikit_rails/templates/components/tooltip/component.rb', line 11 def initialize(text:, position: :top, **html_attrs) @text = text @position = position.to_sym @html_attrs = html_attrs super() end |
Instance Attribute Details
#html_attrs ⇒ Object (readonly)
Returns the value of attribute html_attrs.
9 10 11 |
# File 'lib/uikit_rails/templates/components/tooltip/component.rb', line 9 def html_attrs @html_attrs end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
9 10 11 |
# File 'lib/uikit_rails/templates/components/tooltip/component.rb', line 9 def position @position end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
9 10 11 |
# File 'lib/uikit_rails/templates/components/tooltip/component.rb', line 9 def text @text end |