Class: PhlexKit::BubbleContent
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::BubbleContent
- Defined in:
- app/components/phlex_kit/bubble/bubble_content.rb
Instance Method Summary collapse
-
#initialize(as: :div, **attrs) ⇒ BubbleContent
constructor
A new instance of BubbleContent.
- #view_template ⇒ Object
Methods inherited from BaseComponent
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_template ⇒ Object
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 |