class Voom::Presenters::DSL::Components::Tooltip

Attributes

position[R]

Public Class Methods

new(**attribs_, &block) click to toggle source
# File lib/voom/presenters/dsl/components/tooltip.rb, line 8
def initialize(**attribs_, &block)
  super(type: :tooltip,
        **attribs_, &block)
  @position = attribs.delete(:position){ :left }
  self.text(attribs.delete(:text)) if attribs.key?(:text)
  expand!
end

Public Instance Methods

text(*text, **attribs, &block) click to toggle source
# File lib/voom/presenters/dsl/components/tooltip.rb, line 16
def text(*text, **attribs, &block)
  return @text if locked?
  @text = Components::Typography.new(parent: self, type: :text, text: text, **attribs, &block)
end