Class: Spina::MainNavigation::LinkComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Spina::MainNavigation::LinkComponent
- Defined in:
- app/components/spina/main_navigation/link_component.rb
Instance Method Summary collapse
- #css_classes ⇒ Object
-
#initialize(label, path, active: false) ⇒ LinkComponent
constructor
A new instance of LinkComponent.
Constructor Details
#initialize(label, path, active: false) ⇒ LinkComponent
Returns a new instance of LinkComponent.
4 5 6 7 8 |
# File 'app/components/spina/main_navigation/link_component.rb', line 4 def initialize(label, path, active: false) @label = label @path = path @active = active end |
Instance Method Details
#css_classes ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/components/spina/main_navigation/link_component.rb', line 10 def css_classes if @active "" else "opacity-50" end end |