Class: SubHeaderComponent

Inherits:
Component show all
Defined in:
app/components/sub_header_component.rb

Overview

SubHeader — sub header text within a Header.

Usage:

Header(size: :h2) {
text "Main Title"
SubHeader { text "A subtitle or description" }
}

Constant Summary

Constants inherited from Component

Component::HTML_OPTIONS

Instance Method Summary collapse

Methods inherited from Component

default, #initialize, #render_in, slot

Constructor Details

This class inherits a constructor from Component

Instance Method Details

#to_s ⇒ Object



12
13
14
# File 'app/components/sub_header_component.rb', line 12

def to_s
  tag.div(**merge_html_options(class: "sub header")) { @content }
end