Class: EasyAdmin::Fields::Index::JsonComponent
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- EasyAdmin::Fields::Index::JsonComponent
- Defined in:
- app/components/easy_admin/fields/index/json_component.rb
Instance Attribute Summary
Attributes inherited from BaseComponent
#field, #form, #record, #value
Instance Method Summary collapse
Methods inherited from BaseComponent
#easy_admin_url_helpers, #helpers, #initialize, #rails_url_helpers
Methods included from EasyAdmin::FieldsHelper
#field_component, #render_field
Methods included from DashboardsHelper
#delta_badge_classes, #metric_value_classes, #render_card, #sparkline_color, #sparkline_points, #trend_direction, #trend_icon, #trend_indicator_classes
Constructor Details
This class inherits a constructor from EasyAdmin::Fields::BaseComponent
Instance Method Details
#view_template ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/components/easy_admin/fields/index/json_component.rb', line 5 def view_template div(class: "text-center") do if json_value.present? span(class: "text-green-600 font-bold text-lg") { "+" } else span(class: "text-gray-400 font-bold text-lg") { "−" } end end end |