Class: SdrViewComponents::Structure::HeaderTitleComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/sdr_view_components/structure/header_title_component.rb

Overview

Component for rendering page header title.

Instance Method Summary collapse

Methods inherited from BaseComponent

#args_for, #merge_actions, #merge_classes

Constructor Details

#initialize(title:) ⇒ HeaderTitleComponent

param title [String] Header title text - Required.



8
9
10
11
# File 'app/components/sdr_view_components/structure/header_title_component.rb', line 8

def initialize(title:)
  @title = title
  super()
end

Instance Method Details

#callObject



13
14
15
16
17
# File 'app/components/sdr_view_components/structure/header_title_component.rb', line 13

def call
  tag.div(class: 'h1 my-0') do
    link_to @title, '/'
  end
end