Sha256: 7fcdb833484827da40b4b526cb854e9014731aaa8b2fada769dc5471de474180
Contents?: true
Size: 614 Bytes
Versions: 6
Compression:
Stored size: 614 Bytes
Contents
# frozen_string_literal: true class Avo::EmptyStateComponent < ViewComponent::Base attr_reader :message, :view_type, :add_background, :by_association def initialize(message: nil, view_type: :table, add_background: false, by_association: false) @message = message @view_type = view_type @add_background = add_background @by_association = by_association end def text message || locale_message end def view_type_svg "avo/#{view_type}-empty-state" end private def locale_message helpers.t by_association ? "avo.no_related_item_found" : "avo.no_item_found" end end
Version data entries
6 entries across 6 versions & 1 rubygems