Class: Avo::Fields::Common::BooleanCheckComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Avo::Fields::Common::BooleanCheckComponent
- Defined in:
- app/components/avo/fields/common/boolean_check_component.rb
Instance Method Summary collapse
-
#initialize(checked: false) ⇒ BooleanCheckComponent
constructor
A new instance of BooleanCheckComponent.
Constructor Details
#initialize(checked: false) ⇒ BooleanCheckComponent
Returns a new instance of BooleanCheckComponent.
4 5 6 7 |
# File 'app/components/avo/fields/common/boolean_check_component.rb', line 4 def initialize(checked: false) @icon = checked ? "heroicons/outline/check-circle" : "heroicons/outline/x-circle" @classes = "h-6 #{checked ? "text-green-600" : "text-red-500"}" end |