Sha256: 9d82958723c842af716fd07346be0afcdb5f059f47635c9724b2d82eb891ccaf
Contents?: true
Size: 575 Bytes
Versions: 4
Compression:
Stored size: 575 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 defined?(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
4 entries across 4 versions & 1 rubygems