Class: SdrViewComponents::Structure::HeaderTitleComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- SdrViewComponents::Structure::HeaderTitleComponent
- Defined in:
- app/components/sdr_view_components/structure/header_title_component.rb
Overview
Component for rendering page header title.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(title:) ⇒ HeaderTitleComponent
constructor
param title [String] Header title text - Required.
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
#call ⇒ Object
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 |