Class: Tailwinds::NavbarComponent

Inherits:
TailwindComponent show all
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

Methods included from BackgroundHelper

background

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

#component

Methods included from Tramway::Helpers::DecorateHelper

#tramway_decorate

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(**options)
  @title = { text: options[:title], link: options[:title_link] || '/' }
  @left_items = options[:left_items]
  @right_items = options[:right_items]
  @color = BackgroundHelper.background(options)
end