Class: Avo::DeveloperWarningComponent

Inherits:
BaseComponent
  • Object
show all
Includes:
ApplicationHelper
Defined in:
app/components/avo/developer_warning_component.rb

Constant Summary

Constants included from Concerns::FindAssociationField

Concerns::FindAssociationField::ASSOCIATIONS

Instance Method Summary collapse

Methods included from ApplicationHelper

#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

Methods included from ResourcesHelper

#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

Methods inherited from BaseComponent

#component_name, #hotkey_badge

Methods included from Concerns::FindAssociationField

#find_association_field

Instance Method Details

#classesObject



12
13
14
# File 'app/components/avo/developer_warning_component.rb', line 12

def classes
  "w-full flex items-start gap-3 rounded-lg border border-orange-600/40 bg-orange-50 px-4 py-3 text-orange-950 dark:border-orange-500/30 dark:bg-orange-950/30 dark:text-orange-50"
end

#iconObject



16
17
18
# File 'app/components/avo/developer_warning_component.rb', line 16

def icon
  "tabler/filled/alert-triangle"
end

#render?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'app/components/avo/developer_warning_component.rb', line 8

def render?
  Rails.env.development? || Rails.env.test?
end

#sanitize_optionsObject



20
21
22
23
24
25
# File 'app/components/avo/developer_warning_component.rb', line 20

def sanitize_options
  {
    tags: %w[a code br],
    attributes: %w[href target rel class]
  }
end