Class: Avo::UI::BadgeComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Avo::UI::BadgeComponent
- Defined in:
- app/components/avo/u_i/badge_component.rb
Constant Summary collapse
- VALID_STYLES =
%i[solid subtle].freeze
- VALID_COLORS =
%i[neutral success info warning danger red orange amber yellow lime green emerald teal cyan sky blue indigo violet purple fuchsia pink rose].freeze
Constants included from Concerns::FindAssociationField
Concerns::FindAssociationField::ASSOCIATIONS
Instance Method Summary collapse
Methods inherited from BaseComponent
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 included from Concerns::FindAssociationField
Instance Method Details
#color_classes ⇒ Object
23 24 25 |
# File 'app/components/avo/u_i/badge_component.rb', line 23 def color_classes "badge--#{@color}" if @color.present? end |
#style_classes ⇒ Object
19 20 21 |
# File 'app/components/avo/u_i/badge_component.rb', line 19 def style_classes "badge--#{@style}" if @style.present? end |