Class: Panda::Core::Admin::FormErrorComponent
- Defined in:
- app/components/panda/core/admin/form_error_component.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #default_attrs ⇒ Object
-
#initialize(model:, **attrs) ⇒ FormErrorComponent
constructor
A new instance of FormErrorComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(model:, **attrs) ⇒ FormErrorComponent
Returns a new instance of FormErrorComponent.
7 8 9 10 |
# File 'app/components/panda/core/admin/form_error_component.rb', line 7 def initialize(model:, **attrs) @model = model super(**attrs) end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
12 13 14 |
# File 'app/components/panda/core/admin/form_error_component.rb', line 12 def model @model end |
Instance Method Details
#default_attrs ⇒ Object
14 15 16 17 18 |
# File 'app/components/panda/core/admin/form_error_component.rb', line 14 def default_attrs { class: "mb-4 p-4 bg-red-50 border border-red-200 rounded-md" } end |
#render? ⇒ Boolean
20 21 22 |
# File 'app/components/panda/core/admin/form_error_component.rb', line 20 def render? .any? end |