Sha256: 3a77613ec5d397bd50d76aeab0e94bef23625aa1cef89a53001b58f668749628
Contents?: true
Size: 597 Bytes
Versions: 79
Compression:
Stored size: 597 Bytes
Contents
# frozen_string_literal: true class Avo::SidebarComponent < ViewComponent::Base def initialize(sidebar_open: nil, for_mobile: false) @sidebar_open = sidebar_open @for_mobile = for_mobile end def dashboards return [] unless Avo.plugin_manager.installed?("avo-dashboards") Avo::Dashboards.dashboard_manager.dashboards_for_navigation end def resources Avo.resource_manager.resources_for_navigation helpers._current_user end def tools Avo.tool_manager.tools_for_navigation end def stimulus_target @for_mobile ? "mobileSidebar" : "sidebar" end end
Version data entries
79 entries across 79 versions & 1 rubygems