Class: Primer::HeadingComponent
- Defined in:
- app/components/primer/heading_component.rb
Constant Summary
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**system_arguments) ⇒ HeadingComponent
constructor
A new instance of HeadingComponent.
Methods included from JoinStyleArgumentsHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean
Methods included from ClassNameHelper
Constructor Details
#initialize(**system_arguments) ⇒ HeadingComponent
Returns a new instance of HeadingComponent.
5 6 7 8 |
# File 'app/components/primer/heading_component.rb', line 5 def initialize(**system_arguments) @system_arguments = system_arguments @system_arguments[:tag] ||= :h1 end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'app/components/primer/heading_component.rb', line 10 def call render(Primer::BaseComponent.new(**@system_arguments)) { content } end |