Class: RubyUI::BubbleReactions

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_ui/bubble/bubble_reactions.rb

Constant Summary collapse

SIDES =
{
  top: "top-0 -translate-y-3/4",
  bottom: "bottom-0 translate-y-3/4"
}
ALIGNS =
{
  start: "left-3",
  end: "right-3"
}

Constants inherited from Base

RubyUI::Base::TAILWIND_MERGER

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Constructor Details

#initialize(side: :bottom, align: :end, **attrs) ⇒ BubbleReactions

Returns a new instance of BubbleReactions.



15
16
17
18
19
# File 'lib/ruby_ui/bubble/bubble_reactions.rb', line 15

def initialize(side: :bottom, align: :end, **attrs)
  @side = side
  @align = align
  super(**attrs)
end

Instance Method Details

#view_templateObject



21
22
23
# File 'lib/ruby_ui/bubble/bubble_reactions.rb', line 21

def view_template(&)
  div(**attrs, &)
end