Class: Railsboot::ToastComponent
- Inherits:
-
Component
- Object
- Component
- Railsboot::ToastComponent
- Defined in:
- app/components/railsboot/toast_component.rb
Overview
ViewComponent: renders the toast block.
Instance Method Summary collapse
-
#initialize(**html_attributes) ⇒ ToastComponent
constructor
A new instance of ToastComponent.
Constructor Details
#initialize(**html_attributes) ⇒ ToastComponent
Returns a new instance of ToastComponent.
9 10 11 12 13 14 15 16 |
# File 'app/components/railsboot/toast_component.rb', line 9 def initialize(**html_attributes) @html_attributes = html_attributes @html_attributes[:class] = class_names( "toast", html_attributes.delete(:class) ) end |