Class: DaisyUI::Chat
- Inherits:
-
Base
- Object
- Phlex::HTML
- Base
- DaisyUI::Chat
show all
- Defined in:
- lib/daisy_ui/chat.rb
Constant Summary
collapse
- BUBBLE_MODIFIERS =
Bubble color modifiers (applied to chat-bubble element)
{
neutral: "chat-bubble-neutral",
primary: "chat-bubble-primary",
secondary: "chat-bubble-secondary",
accent: "chat-bubble-accent",
info: "chat-bubble-info",
success: "chat-bubble-success",
warning: "chat-bubble-warning",
error: "chat-bubble-error"
}.freeze
Constants inherited
from Base
Base::BOOLS, Base::COLOR_MODIFIERS
Instance Method Summary
collapse
Methods inherited from Base
inherited, #initialize, register_modifiers
Constructor Details
This class inherits a constructor from DaisyUI::Base
Instance Method Details
#bubble(*modifiers, **options) ⇒ Object
80
81
82
83
|
# File 'lib/daisy_ui/chat.rb', line 80
def bubble(*modifiers, **options, &)
bubble_classes = build_bubble_classes(modifiers, options)
div(class: bubble_classes, **options, &)
end
|
85
86
87
|
# File 'lib/daisy_ui/chat.rb', line 85
def (**options, &)
div(class: component_classes("chat-footer", options:), **options, &)
end
|
76
77
78
|
# File 'lib/daisy_ui/chat.rb', line 76
def (**options, &)
div(class: component_classes("chat-header", options:), **options, &)
end
|
#image(**options) ⇒ Object
72
73
74
|
# File 'lib/daisy_ui/chat.rb', line 72
def image(**options, &)
div(class: component_classes("chat-image", options:), **options, &)
end
|
#view_template ⇒ Object
68
69
70
|
# File 'lib/daisy_ui/chat.rb', line 68
def view_template(&)
public_send(as, class: classes, **attributes, &)
end
|