Class: Spark::Nav::Sidebar
- Inherits:
-
Component::Base
- Object
- ActionView::Component::Base
- Component::Base
- Spark::Nav::Sidebar
- Defined in:
- app/components/spark/nav/sidebar.rb
Constant Summary collapse
- THEME =
%i[default primary]
Instance Method Summary collapse
-
#initialize ⇒ Sidebar
constructor
A new instance of Sidebar.
Methods inherited from Component::Base
Constructor Details
#initialize ⇒ Sidebar
Returns a new instance of Sidebar.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'app/components/spark/nav/sidebar.rb', line 28 def initialize(*) super classname.base = "spark-nav-sidebar" classname.add("theme-#{@theme}") data.add(nav_id: unique_id) if data.add(scroll: true) @toggle = false end aria.add(label: @label) end |