Class: PhlexKit::BubbleContent

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/bubble/bubble_content.rb

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(as: :div, **attrs) ⇒ BubbleContent

Returns a new instance of BubbleContent.



3
4
5
6
# File 'app/components/phlex_kit/bubble/bubble_content.rb', line 3

def initialize(as: :div, **attrs)
  @as = as
  @attrs = attrs
end

Instance Method Details

#view_templateObject



7
8
9
# File 'app/components/phlex_kit/bubble/bubble_content.rb', line 7

def view_template(&)
  send(@as, **mix({ class: "pk-bubble-content", data: { slot: "bubble-content" } }, @attrs), &)
end