Class: StompBase::Ui::HeaderComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/stomp_base/ui/header_component.rb

Instance Method Summary collapse

Methods inherited from BaseComponent

#call, #render?

Constructor Details

#initialize(title:, navigation: {}, display_options: {}) ⇒ HeaderComponent

Returns a new instance of HeaderComponent.



6
7
8
9
10
11
12
13
14
15
16
# File 'app/components/stomp_base/ui/header_component.rb', line 6

def initialize(title:, navigation: {}, display_options: {})
  super()
  @title = title
  @back_path = navigation[:back_path]
  @back_label = navigation[:back_label]
  @show_refresh = navigation[:show_refresh] || false
  @gradient_colors = display_options[:gradient_colors] || default_gradient_colors
  @status_message = display_options[:status_message]
  @custom_button = display_options[:custom_button]
  @icon = display_options[:icon]
end