Class: Avo::SidebarComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Avo::SidebarComponent
- Defined in:
- app/components/avo/sidebar_component.rb
Instance Method Summary collapse
- #dashboards ⇒ Object
-
#initialize(sidebar_open: nil, for_mobile: false) ⇒ SidebarComponent
constructor
A new instance of SidebarComponent.
- #resources ⇒ Object
- #stimulus_target ⇒ Object
- #tools ⇒ Object
Constructor Details
#initialize(sidebar_open: nil, for_mobile: false) ⇒ SidebarComponent
Returns a new instance of SidebarComponent.
4 5 6 7 |
# File 'app/components/avo/sidebar_component.rb', line 4 def initialize(sidebar_open: nil, for_mobile: false) @sidebar_open = @for_mobile = for_mobile end |
Instance Method Details
#dashboards ⇒ Object
9 10 11 |
# File 'app/components/avo/sidebar_component.rb', line 9 def dashboards Avo::App. end |
#resources ⇒ Object
13 14 15 |
# File 'app/components/avo/sidebar_component.rb', line 13 def resources Avo::App. end |
#stimulus_target ⇒ Object
21 22 23 |
# File 'app/components/avo/sidebar_component.rb', line 21 def stimulus_target @for_mobile ? "mobileSidebar" : "sidebar" end |