Class: Shadcn::FieldComponent::ErrorComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::FieldComponent::ErrorComponent
- Defined in:
- app/components/shadcn/field_component.rb
Overview
Error subcomponent
Constant Summary collapse
- BASE_CLASSES =
"text-[0.8rem] font-medium text-destructive"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
This class inherits a constructor from Shadcn::BaseComponent
Instance Method Details
#call ⇒ Object
107 108 109 |
# File 'app/components/shadcn/field_component.rb', line 107 def call tag.p(content, class: merge_classes(BASE_CLASSES), role: "alert", **.merge(build_data)) end |