Class: Avo::DiscreetInformationComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Avo::DiscreetInformationComponent
show all
- Defined in:
- app/components/avo/discreet_information_component.rb
Constant Summary
Concerns::FindAssociationField::ASSOCIATIONS
Instance Method Summary
collapse
#component_name
#a_button, #a_link, #body_classes, #button_classes, #chart_color, #container_classes, #d, #decode_filter_params, #e, #editor_file_path, #editor_url, #empty_state, #encode_filter_params, #frame_id, #get_model_class, #input_classes, #mount_path, #number_to_social, #possibly_rails_authentication?, #render_license_warning, #root_path_without_url, #rtl?, #text_direction, #ui, #wrap_in_modal
#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_selector_data_attributes, #record_path, #record_title, #resource_for_record, #resource_grid, #resource_show_path, #resource_table
#find_association_field
Instance Method Details
#as_badge? ⇒ Boolean
23
24
25
|
# File 'app/components/avo/discreet_information_component.rb', line 23
def as_badge?
@as == :badge
end
|
#as_icon? ⇒ Boolean
15
16
17
|
# File 'app/components/avo/discreet_information_component.rb', line 15
def as_icon?
@as == :icon
end
|
#as_key_value? ⇒ Boolean
27
28
29
|
# File 'app/components/avo/discreet_information_component.rb', line 27
def as_key_value?
@as == :key_value
end
|
#as_text? ⇒ Boolean
19
20
21
|
# File 'app/components/avo/discreet_information_component.rb', line 19
def as_text?
@as == :text
end
|
#wrapper_element(args = {}, &block) ⇒ Object
31
32
33
34
35
36
37
|
# File 'app/components/avo/discreet_information_component.rb', line 31
def wrapper_element(args = {}, &block)
if @url.present?
link_to @url, **args, target: @target, &block
else
tag.div(**args, &block)
end
end
|