app/components/solidus_admin/taxes/component.rb in solidus_admin-0.1.0 vs app/components/solidus_admin/taxes/component.rb in solidus_admin-0.2.0

- old
+ new

@@ -1,25 +1,25 @@ # frozen_string_literal: true -class SolidusAdmin::Taxes::Component < SolidusAdmin::BaseComponent - include SolidusAdmin::Layout::PageHelpers - renders_one :actions - - def initialize(model_class:) - @model_class = model_class +class SolidusAdmin::Taxes::Component < SolidusAdmin::UI::Pages::Index::Component + def title + safe_join([ + tag.div(t(".title")), + tag.div(t(".subtitle"), class: "font-normal text-sm text-gray-500"), + ]) end def tabs [ { text: Spree::TaxCategory.model_name.human.pluralize, href: solidus_admin.tax_categories_path, - "aria-current": @model_class == Spree::TaxCategory, + current: model_class == Spree::TaxCategory, }, { text: Spree::TaxRate.model_name.human.pluralize, href: solidus_admin.tax_rates_path, - "aria-current": @model_class == Spree::TaxRate, + current: model_class == Spree::TaxRate, }, ] end end