Class: Avo::Fields::Common::KeyValueComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Avo::Fields::Common::KeyValueComponent
- Includes:
- ApplicationHelper
- Defined in:
- app/components/avo/fields/common/key_value_component.rb
Instance Attribute Summary collapse
-
#view ⇒ Object
readonly
Returns the value of attribute view.
Instance Method Summary collapse
-
#initialize(field:, form: nil, view: :show) ⇒ KeyValueComponent
constructor
A new instance of KeyValueComponent.
Methods included from ApplicationHelper
#a_button, #a_link, #button_classes, #empty_state, #get_model_class, #input_classes, #render_license_warning, #render_license_warnings, #root_path_without_url, #svg, #white_panel_classes
Constructor Details
#initialize(field:, form: nil, view: :show) ⇒ KeyValueComponent
Returns a new instance of KeyValueComponent.
8 9 10 11 12 |
# File 'app/components/avo/fields/common/key_value_component.rb', line 8 def initialize(field:, form: nil, view: :show) @field = field @form = form @view = view end |
Instance Attribute Details
#view ⇒ Object (readonly)
Returns the value of attribute view.
6 7 8 |
# File 'app/components/avo/fields/common/key_value_component.rb', line 6 def view @view end |