Class: Tailwinds::NavbarComponent
- Inherits:
-
TailwindComponent
- Object
- ViewComponent::Base
- Tramway::BaseComponent
- 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
Constants inherited from TailwindComponent
TailwindComponent::SIZE_CLASSES
Instance Method Summary collapse
-
#initialize(**options) ⇒ NavbarComponent
constructor
A new instance of NavbarComponent.
Methods included from BackgroundHelper
Methods included from Tramway::Helpers::ViewsHelper
#tramway_back_button, #tramway_badge, #tramway_button, #tramway_cell, #tramway_container, #tramway_flash, #tramway_form_for, #tramway_header, #tramway_row, #tramway_table, #tramway_title
Methods included from Tramway::Helpers::ComponentHelper
Methods included from Tramway::Helpers::DecorateHelper
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 |