Class: SolidusAdmin::UI::Toast::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/solidus_admin/ui/toast/component.rb

Constant Summary collapse

SCHEMES =
{
  default: %w[
    bg-gray-800 text-white
  ],
  error: %w[
    bg-red-500 text-white
  ],
}

Instance Method Summary collapse

Constructor Details

#initialize(text:, icon: nil, scheme: :default) ⇒ Component

Returns a new instance of Component.



13
14
15
16
17
# File 'app/components/solidus_admin/ui/toast/component.rb', line 13

def initialize(text:, icon: nil, scheme: :default)
  @text = text
  @icon = icon
  @scheme = scheme.to_sym
end