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
Instance Method Details
#actions ⇒ Object
34
|
# File 'lib/protos/alert.rb', line 34
def actions(...) = render Actions.new(...)
|
#icon ⇒ Object
32
|
# File 'lib/protos/alert.rb', line 32
def icon(...) = render Icon.new(...)
|
#view_template ⇒ Object
28
29
30
|
# File 'lib/protos/alert.rb', line 28
def view_template(&)
div(**attrs, &)
end
|