Class: Satis::Menu::Component
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Satis::Menu::Component
- Defined in:
- app/components/satis/menu/component.rb
Instance Attribute Summary collapse
-
#icon ⇒ Object
readonly
renders_many :tabs, Tab::Component.
-
#icon_id ⇒ Object
readonly
renders_many :tabs, Tab::Component.
-
#menu ⇒ Object
readonly
renders_many :tabs, Tab::Component.
-
#strategy ⇒ Object
readonly
renders_many :tabs, Tab::Component.
Attributes inherited from ApplicationComponent
Instance Method Summary collapse
-
#initialize(menu, icon: nil, icon_id: nil, strategy: "fixed") ⇒ Component
constructor
A new instance of Component.
- #render? ⇒ Boolean
Methods inherited from ApplicationComponent
Constructor Details
#initialize(menu, icon: nil, icon_id: nil, strategy: "fixed") ⇒ Component
Returns a new instance of Component.
9 10 11 12 13 14 15 |
# File 'app/components/satis/menu/component.rb', line 9 def initialize(, icon: nil, icon_id: nil, strategy: "fixed") super @menu = @icon = icon || "fa-solid fa-ellipsis" @icon_id = icon_id @strategy = strategy end |
Instance Attribute Details
#icon ⇒ Object (readonly)
renders_many :tabs, Tab::Component
7 8 9 |
# File 'app/components/satis/menu/component.rb', line 7 def icon @icon end |
#icon_id ⇒ Object (readonly)
renders_many :tabs, Tab::Component
7 8 9 |
# File 'app/components/satis/menu/component.rb', line 7 def icon_id @icon_id end |
#menu ⇒ Object (readonly)
renders_many :tabs, Tab::Component
7 8 9 |
# File 'app/components/satis/menu/component.rb', line 7 def @menu end |
#strategy ⇒ Object (readonly)
renders_many :tabs, Tab::Component
7 8 9 |
# File 'app/components/satis/menu/component.rb', line 7 def strategy @strategy end |
Instance Method Details
#render? ⇒ Boolean
17 18 19 |
# File 'app/components/satis/menu/component.rb', line 17 def render? .items.present? end |