Class: Tailwinds::NavbarComponent
- Inherits:
-
TailwindComponent
- Object
- ViewComponent::Base
- Tramway::Component::Base
- TailwindComponent
- Tailwinds::NavbarComponent
- Includes:
- BackgroundHelper
- Defined in:
- app/components/tailwinds/navbar_component.rb
Overview
Navbar class main class
Constant Summary
Constants included from BackgroundHelper
BackgroundHelper::CSS_COLORS, BackgroundHelper::DEFAULT_BACKGROUND_COLOR, BackgroundHelper::DEFAULT_BACKGROUND_INTENSITY, BackgroundHelper::MAX_INTENSITY, BackgroundHelper::MIN_INTENSITY
Instance Method Summary collapse
-
#initialize(**options) ⇒ NavbarComponent
constructor
A new instance of NavbarComponent.
Methods included from BackgroundHelper
Methods included from Tramway::Helpers::ComponentHelper
Constructor Details
#initialize(**options) ⇒ NavbarComponent
Returns a new instance of NavbarComponent.
35 36 37 38 39 40 |
# File 'app/components/tailwinds/navbar_component.rb', line 35 def initialize(**) @title = { text: [:title], link: [:title_link] || '/' } @left_items = [:left_items] @right_items = [:right_items] @color = BackgroundHelper.background() end |