Class: Protos::Alert

Inherits:
Component show all
Defined in:
lib/protos/alert.rb,
lib/protos/alert/icon.rb,
lib/protos/alert/actions.rb

Defined Under Namespace

Classes: Actions, Icon

Constant Summary collapse

Styles =
Types::Coercible::Symbol.enum(
  :info,
  :success,
  :warning,
  :error
)
STYLES =
{
  info: "alert-info",
  error: "alert-error",
  warning: "alert-warning",
  success: "alert-success"
}.freeze

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#actionsObject



34
# File 'lib/protos/alert.rb', line 34

def actions(...) = render Actions.new(...)

#iconObject



32
# File 'lib/protos/alert.rb', line 32

def icon(...) = render Icon.new(...)

#view_templateObject



28
29
30
# File 'lib/protos/alert.rb', line 28

def view_template(&)
  div(**attrs, &)
end